[wp-trac] [WordPress Trac] #20491: Introduce some JavaScript i18n functions

WordPress Trac noreply at wordpress.org
Wed Sep 21 06:33:23 UTC 2016


#20491: Introduce some JavaScript i18n functions
--------------------------------------+-----------------------------
 Reporter:  johnbillion               |       Owner:  swissspidy
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  Future Release
Component:  I18N                      |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  javascript
--------------------------------------+-----------------------------

Comment (by swissspidy):

 Current status:

 The [https://github.com/swissspidy/glotpress-json GlotPress plugin] for
 JSON export I mentioned is in much better shape now, with unit tests and
 everything. It's like 95% done. There's a chance it might get into
 GlotPress 2.3 as well.

 Besides that, I'm still tinkering with the patch to find the best way to
 load the translation files. We could load the JSON files in PHP and use
 `wp_add_inline_script` to initialize them or we could also fetch them via
 Ajax (think `wp.i18n.load_textdomain()`). The latter is interesting when
 we want to do locale switching in JS in the future. Maybe anyone has an
 idea here.

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


More information about the wp-trac mailing list