[wp-trac] [WordPress Trac] #57807: Twenty Twelve and Twenty Fifteen: maintain font subset translations

WordPress Trac noreply at wordpress.org
Wed Mar 1 20:29:32 UTC 2023


#57807: Twenty Twelve and Twenty Fifteen: maintain font subset translations
-----------------------------------------+------------------------------
 Reporter:  sabernhardt                  |       Owner:  (none)
     Type:  enhancement                  |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Bundled Theme                |     Version:  trunk
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch close 2nd-opinion  |     Focuses:
-----------------------------------------+------------------------------

Comment (by sabernhardt):

 Example of a language code array (for themes without these proposed
 functions):

 {{{
 <?php
 $script_families = array(
         // Cyrillic.
         'bel'   => 'cyrillic',
         'bg-BG' => 'cyrillic',
         'kk'    => 'cyrillic',
         'mk-MK' => 'cyrillic',
         'mn'    => 'cyrillic',
         'ru-RU' => 'cyrillic',
         'sah'   => 'cyrillic',
         'sr-RS' => 'cyrillic',
         'tt-RU' => 'cyrillic',
         'uk'    => 'cyrillic',
         'uz-UZ' => 'cyrillic',

         // Devanagari.
         'bn-BD' => 'devanagari',
         'hi-IN' => 'devanagari',
         'mr'    => 'devanagari',
         'ne-NP' => 'devanagari',

         // Greek.
         'el'    => 'greek',

         // Hebrew.
         'he-IL' => 'hebrew',

         // Vietnamese.
         'vi'    => 'vietnamese',
 );
 $locale = get_bloginfo( 'language' );
 if ( array_key_exists( $locale, $script_families ) ) {
         // Do something with the special script family name.
         echo $script_families[$locale];
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57807#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list