[wp-trac] [WordPress Trac] #15677: It is not possible to install multiple variants of the same language

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 4 15:07:29 UTC 2010


#15677: It is not possible to install multiple variants of the same language
--------------------------+-------------------------------------------------
 Reporter:  caesarsgrunt  |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:  3.1            
 Severity:  normal        |    Keywords:  needs-patch    
--------------------------+-------------------------------------------------
 Because of the way {{{mu_dropdown_languages()}}} and
 {{{format_code_lang()}}} work, it is impossible to have multiple variants
 of the same language installed. The list of languages returned by
 {{{mu_dropdown_languages()}}} only includes one variant of each language
 (the one with the country code which comes last when sorted
 alphabetically).

 For example, if .mo files for es_ES and es_PE are both installed, then
 only es_PE will be shown.

 Furthermore, whatever variant of the language is installed, the name will
 be the same, not indicating the correct language variant. In the example
 above, the language name will be "Spanish; Castillian", even for the es_PE
 localisation. This is highly misleading.

 A final problem is that the langauge names are not localised themselves,
 with the exception of "English".

 The cause of these problems is the fact that {{{format_code_lang()}}}
 ignores the country code and only considers the language code when
 choosing the name to return. Furthermore, it returns hardcoded language
 names rather than translated names.

 Since {{{mu_dropdown_languages()}}} uses the return value of
 {{{format_code_lang()}}} as the key for its internal {{{$output}}} array,
 this means that later language variants overwrite earlier ones.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15677>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list