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

WordPress Trac noreply at wordpress.org
Fri May 9 20:53:45 UTC 2014


#28197: Fallback Languages
---------------------------+-----------------------------
 Reporter:  downstairsdev  |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  I18N           |    Version:  trunk
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 We should do a better job of loading translation files in the user's
 language if they are available.

 For instance, if a Spanish speaker has their locale set as es_MX (Spanish
 Mexico) it would be preferable to load any available Spanish translations
 files (es_ES, es_CO, etc) before returning the default (generally
 English).

 I wrote up a quick patch, tester plugin, and plugin that demonstrate this
 idea.  If a $mofile is not available in the user's current locale, it will
 search for and return the first available translation that is also in the
 same language.

 A better option might be to create a filterable stack rank of locales for
 WordPress to search for within the language before returning the default.
 Other suggestions are also welcome.

 This idea was also discussed in an "ideas" thread:
 http://wordpress.org/ideas/topic/fallback-to-generic-language-file-when-
 specific-locale-file-absent

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


More information about the wp-trac mailing list