kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

Implement translations of the UI

Open mossroy opened this issue 12 years ago • 7 comments

Probably based on l10n.js library : https://github.com/fabi1cazenave/webL10n I should also read https://hacks.mozilla.org/2013/08/localizing-firefox-os-apps/

mossroy avatar Jun 13 '13 15:06 mossroy

Maybe contact http://babelzilla.org/ ?

mossroy avatar Apr 13 '14 14:04 mossroy

I should start with https://developer.mozilla.org/en-US/Apps/Build/Localization/App_Localization_with_Transifex

mossroy avatar Aug 19 '14 21:08 mossroy

As the links above might be outdated, I found https://phraseapp.com/blog/posts/step-step-guide-javascript-localization/ that compares a few libraries (including jQuery.I18n, maintained by wikimedia)

mossroy avatar Jan 11 '18 12:01 mossroy

Thanks @mossroy . Very interesting. On a quick reading, I think jQuery.l18n would make a lot of sense for us, since it's maintained by Wikimedia, so we can be sure it'll be around as long as Wikipedia is around ;-) ... More importantly, it doesn't look overly complicated.

I particularly like this syntax:

<li data-i18n="message-key">Fallback text</li>

So we could keep a readable HTML file (with the fallback text containing the current English-language strings), and provide variable names for the translation strings, which will be read from a fr.json, es.json, de.json file depending on the language.

So, rather than offering different apps, we could give the user the chance to choose the app language at the outset (or in the options). Alternatively, different languages can be set as the default according to the part of the world being targeted. I imagine that initially we're talking about two or three languages other than English. But this seems perfectly scalable (of course, given the number of languages Wikipedia has).

Jaifroid avatar Jan 11 '18 13:01 Jaifroid

Just a cross-reference to #306 (RTL Support), as we should take the opportunity to ensure that any refactoring takes RTL into account.

Jaifroid avatar Jan 11 '18 13:01 Jaifroid

Kiwix translators works on translatewiki.net. What I propose is that the software is setup to deal with localisation files. Then we could have a look together how to synchronize this with translatewiki.

kelson42 avatar Jan 12 '18 11:01 kelson42

I just had a quick look at the current offerings, and it seems jQuery.l18n has fallen into disrepair, replaced by https://github.com/wikimedia/banana-i18n . This is in line with the general move away from dependency on jQuery, now that babel does the job of providing needed polyfills. Banana-i18n has active and recent updates, and is a more modern version of jQuery.i18n.

Jaifroid avatar Jul 26 '20 08:07 Jaifroid

We are in general not really good with UI localization at Kiwix. This is bad. If the UI is translated with banana I could organize sync with Translatewiki. I would suggest to rethink the priority of this ticket.

kelson42 avatar Jan 09 '23 17:01 kelson42

As a linguist, I completely agree with you! I've changed the milestone.

Jaifroid avatar Jan 09 '23 17:01 Jaifroid