Make WordPress Core

Ticket #32939: formatting.diff

File formatting.diff, 654 bytes (added by Dualcube, 7 years ago)

We added a filter called update_locale_for_remove_accents which could be used to change the WP default locale for installations that want to make use of the special cases for hardcoded locales when those are different in their local installation.

  • wp-includes/formatting.php

     
    16941694
    16951695                // Used for locale-specific rules
    16961696                $locale = get_locale();
     1697                /**
     1698                 * Filters for installations that have different locale names.
     1699                 *
     1700                 * @since 4.7.2
     1701                 *
     1702                 * @param string $locale The locale ID.
     1703                 */
     1704                $locale = apply_filters('update_locale_for_remove_accents', $locale);
    16971705
    16981706                if ( 'de_DE' == $locale || 'de_DE_formal' == $locale || 'de_CH' == $locale || 'de_CH_informal' == $locale ) {
    16991707                        $chars[ 'Ä' ] = 'Ae';