[wp-trac] [WordPress Trac] #28577: Allow language to be chosen during initial install
WordPress Trac
noreply at wordpress.org
Wed Jul 2 23:04:08 UTC 2014
#28577: Allow language to be chosen during initial install
----------------------------+------------------
Reporter: nacin | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 4.0
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+------------------
Comment (by azaozz):
Replying to [comment:8 nacin]:
> On errors:
>
> * Before showing the language chooser, pre-flight whether we can
actually download and install language files using 'direct' file access.
Thinking we ignore FTP?
Been thinking what we can do in these cases. One possibility is
translating from JS (similar to how TinyMCE does it). On page load we do a
JSONP request that returns an translation object `{ 'English string':
'Translated string', ... }`. Then 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.
Another (better?) possibility would be to get an installation-only .mo
file from the WordPress.org API on each request and use it directly (keep
it in memory). Yes, it's expensive and will slow down the 3-4 page loads
while installing, but would work in all cases.
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28577#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list