[wp-trac] [WordPress Trac] #45592: Remove Accents

WordPress Trac noreply at wordpress.org
Wed Dec 12 11:47:09 UTC 2018


#45592: Remove Accents
-------------------------+-----------------------------
 Reporter:  MaximeCulea  |      Owner:  (none)
     Type:  enhancement  |     Status:  assigned
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Formatting   |    Version:  5.0
 Severity:  normal       |   Keywords:  2nd-opinion
  Focuses:               |
-------------------------+-----------------------------
 I have been lately working on an extension for library filename
 sanitization and seen this on wp-includes/formatting.php :
 {{{#!php
 <?php
 // Used for locale-specific rules
 $locale = get_locale();
 if ( 'de_DE' == $locale || 'de_DE_formal' == $locale || 'de_CH' == $locale
 || 'de_CH_informal' == $locale ) {
         $chars['Ä'] = 'Ae';
         $chars['ä'] = 'ae';
         $chars['Ö'] = 'Oe';
         $chars['ö'] = 'oe';
         $chars['Ü'] = 'Ue';
         $chars['ü'] = 'ue';
         $chars['ß'] = 'ss';
 } elseif ( 'da_DK' === $locale ) {
         $chars['Æ'] = 'Ae';
         $chars['æ'] = 'ae';
         $chars['Ø'] = 'Oe';
         $chars['ø'] = 'oe';
         $chars['Å'] = 'Aa';
         $chars['å'] = 'aa';
 } elseif ( 'ca' === $locale ) {
         $chars['l·l'] = 'll';
 } elseif ( 'sr_RS' === $locale || 'bs_BA' === $locale ) {
         $chars['Đ'] = 'DJ';
         $chars['đ'] = 'dj';
 }
 }}}
 What is the purpose about applying theses replacements only for certains
 languages ?

 Moreover, why base this on the locale and not the user locale ?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45592>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list