[wp-trac] [WordPress Trac] #28197: Fallback Languages

WordPress Trac noreply at wordpress.org
Fri May 9 21:04:35 UTC 2014


#28197: Fallback Languages
---------------------------+------------------------------
 Reporter:  downstairsdev  |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  I18N           |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by downstairsdev):

 The tester plugin displays two strings in the dashboard next to the
 "screen options" tab.  The first one is the locale for the site, e.g.
 "en_MX".  The second one display the translation for the string "default".
 So, if no translation file is loaded, "default" is displayed.

 There are two bundled translation files, es_ES and es_MX.  If those files
 are loaded, the translation of "default" is displayed- which I've just set
 as the locale for each file ('es_ES' and 'es_MX' respectively).

 To test, set a Spanish locale other than one of the two translations (e.g.
 define('WPLANG', 'es_CO'); ).  If everything is working correctly, the
 first string will return the locale ( 'es_CO' ), and the second string
 will display the translation for the actual translation file that got
 loaded.  Since 'es_CO' is not available, it will be one of the other
 Spanish translations ( 'es_ES' ).

 Hopefully this makes sense!

 --

 The filter also allows us to do this through a plugin.  Suggestions and
 pull requests welcome there as well:
 https://github.com/devinsays/fallback-languages

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


More information about the wp-trac mailing list