Changes between Version 1 and Version 2 of Ticket #28577, comment 17
- Timestamp:
- 07/02/2014 11:14:30 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28577, comment 17
v1 v2 6 6 Been thinking what we can do in these cases. One possibility is translating from JS (similar to how TinyMCE does it). We do a JSONP request that returns an translation object `{ 'English string': 'Translated string', ... }`. Then on DOM ready we walk the DOM and replace (may wrap all strings in something like `<span class="wp-translate">` to make that a bit easier/faster). This may make the page flicker a bit. 7 7 8 Another (better?) possibility would be to get an installation-only .mo file from the WordPress.org API on each requestand use it directly (keep it in memory). Yes, it's expensive and will slow down the 3-4 page loads while installing, but will work in all cases.8 Another (better?) possibility would be to get an installation-only .mo file from the WordPress.org API on each page load and use it directly (keep it in memory). Yes, it's expensive and will slow down the 3-4 page loads while installing, but will work in all cases. 9 9 10 10 This can also be used on the FTP setup screen (right after we are up and running) so the user can install the language pack.