12-26-2011, 08:30 PM | #1 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
[Kindle Touch] Localization
IMPORTANT NOTICE FOR FIRMWARE 5.1.0:
If you are running 5.1.0, DO NOT attempt the installation. If you are planning to update to 5.1.0, UNINSTALL the language pack and the locale settings enabler before updating. DO NOT REINSTALL AFTER THE UPDATE. Unfortunately, this effort seems to have come to an end, at least for the time being. All initially active developers have switched their attention to other projects. However, this does not mean that internationalization/localization for newer firmware versions is impossible. In fact, all the required tools exist and are ready to use. The only thing that is needed is someone who is willing to spend some effort on this. All it takes is a little bit of initiative, but it seems like nobody is willing to do that. Information on how to get your Kindle Touch localized can be found below. Here are a few screenshots of a Kindle that was localized to german: The following instructions are valid for Kindle Touch firmwares 5.0.0 - 5.0.4. All language pack snapshots starting from February 13, 2012 are considered "stable" releases (in the sense that iff the chosen language is 100% correctly translated, your Kindle should be fully localized). Your mileage may still vary for individual languages, as described below. Note: for the german localization (only!), there is also an all-in-one-installer which replaces steps 2.-5. below by a single one. See here for more information. To get your Kindle Touch localized:
If you want to get involved in the translations:
If you are using the abovementioned appliance: Spoiler:
Original Post: Hi all, I have been playing around with the K-Touch to see whether / how it can be localized to languages other than english. Even if it's officially only available in the US, I presume that there are other people out there who would want to see it localized. I'm not quite at the point of releasing anything yet, but I think I figured out most of the required changes. They affect multiple parts of the system: * "graphical" messages via blanket ("your kindle is booting","you are connected in USB drive mode" etc).: These are standard locale files (.mo), found in /usr/share/locale. * Java subsystem: much, but not all, of the UI. Can be localized by dropping the relevant resource bundles into the classpath. * Pillow (HTML/JS) subsystem: while the strings are nicely outsourced into /usr/share/webkit-1.0/pillow/strings/ , there doesn't seem to be a non-obtrusive way to add additional languages. Probably the best solution is to bind-mount a directory containing the localized strings. * WAF Apps (Browser etc.): didn't look into these yet, but it would probably be similar to pillow. The good news is that the K-Touch actually comes with localization facilities (even the UI part of selecting language and various keyboard layouts). These features are present in the code, but not activated. It only takes a slight patch to one class to activate them though. I'd post a screenshot of what it looks like, if only I knew how to make screenshots ;-) So, anybody interested in this stuff? Any ideas for how the Javascript can be localized in the least intrusive way possible? Last edited by ixtab; 06-02-2012 at 04:56 AM. |
12-26-2011, 08:42 PM | #2 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Did you find the way to add additional locales definition so that langpicker notices it and displays UI?
|
Advert | |
|
12-26-2011, 08:50 PM | #3 | |
Member
Posts: 12
Karma: 28820
Join Date: Dec 2011
Device: Kindle Touch
|
Quote:
https://www.mobileread.com/forums/sho...69&postcount=8 |
|
12-26-2011, 10:58 PM | #4 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
Anyway, I don't think that's a huge deal though, because you can use the settings menu. These screenshots give a pretty good impression of what it looks like. The main settings page is already semi-localized (first attempt). Thanks mc2739 for the screenshot hint. |
|
12-26-2011, 11:29 PM | #5 | |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Langpicker UI could be invoked (I assume) with sending event via lipc. Look into /etc/upstart/langpicker.conf. But I didn't managed to create additional locale definition so that it could be seen by langpicker (but it's definitely must be located in /opt/amazon/ebook/config/locales/). And when langpicker sees only one locale definition, it chooses it automaticaly without showing GUI. Looks pretty cool! |
|
Advert | |
|
12-27-2011, 12:00 AM | #6 | ||
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
Code:
[root@kindle locales]# cat de.properties locale=de locales.supported=de-DE display.name.de-DE=Deutsch [root@kindle locales]# cat pl.properties locale=pl locales.supported=pl-PL display.name.pl-PL=Polski posix.id=en_US.UTF-8 Quote:
(UPDATE: see my next post on how to access that page without needing this file!) UPDATE2: It is strongly recommended to use the installer file linked from the first post, instead of this file. Last edited by ixtab; 01-26-2012 at 07:13 PM. Reason: update: installer package |
||
12-27-2011, 12:17 AM | #7 |
Kindle Dissector
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
|
Is it possible to make a launcher extension that shows the language settings screen?
|
12-27-2011, 12:49 AM | #8 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.settings?historyView=INTERNATIONAL The launcher extension is trivial then. Still, I personally prefer the method of "overriding" the class file because it integrates more naturally (and BTW, no functionality is lost: the dictionaries management is also available as a sub-option of the "international" settings). The only question is how it would behave on OTA updates which affect the SettingsDisplayController implementation. Oh, you can go to any of the view modes defined by in the SettingsBooklet hashmap using this method. I assume this also goes for other booklets. |
|
12-27-2011, 02:11 AM | #9 |
Groupie
Posts: 157
Karma: 1777
Join Date: Sep 2010
Location: Minsk, Belarus
Device: Kindle 4
|
ixtab, you can use my localization hack to localize KT. My K3Translator.jar program can extract all strings from given JARs, so you can localize it. Second - when you install hack, it on-the-fly translate original JAR and mount localized files (in K3) or make additional language (in K4). So most of work is done
I'm already bought KT, but I will receive it in the middle of Jan (so I can't make my localizations for KT). |
12-27-2011, 02:22 AM | #10 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
|
|
12-27-2011, 04:15 AM | #11 |
Addict
Posts: 396
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
|
Couldn't we assume, that the localisation, at least the ones being on K4, are on the Touch es well?
@Sir Alex, could ypu provide the GER files from the K4 or tell me, where to find them. @ixtab, I have done a nearly perfect german localisation on the K3 for a small group in Germany. Could give you a hand in doing the GER localisation for the touch. I am still hoping, Amazons starts to ship the touch international with the same language packages as the K4. Would like to do NOT the same amount of work as on the K3. Would you provide me with the part you already have done? |
12-27-2011, 04:55 AM | #12 | ||
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
- there are 637 resource ids present on the K4, but not on the KT. - there are 654 resource ids present on the KT, but not on the K4. - there are 61 resource ids in common. Take these numbers with a grain of salt, as this is preliminary work. But you get the idea. All is not lost yet... I will further investigate this (seeing if I can find more matches when comparing the content instead of the ids). I'll keep you updated. In the worst case, of course there is always prior work to build upon -- if only for the sake of not re-thinking about how to translate every single phrase, but already having a nice stock to start with. This also addresses your comment below - It'll still be work, but it should be less. Quote:
My suggestion, if you want to contribute to de_DE, is the following: - [get a KT, jailbreak it if needed], and create the locale "metadata" file as outlined above, and get the KT to even think that there are other locales installed. See the various LIPC commands above. - start by translating the blanket messages in /usr/share/locale. This is pretty straightforward and not a terrible amount of work. It's still pretty rewarding. And most of all it's completely independent from the rest. - in the mean time, I'll keep looking at those Java locales and keep you updated about my findings. Don't be afraid of me translating everything on my own, I certainly won't. I'm still at the point of figuring out how to make this entire process as easy as possible (before even starting actual translation). Of course, this should also be useful for other translators. - I suggest to leave the pillow / WAF parts out of the game for now, for one very simple reason: to provide a consistent terminology, this step should probably come *after* the Java part is done. However, if you're eager to jump at it, I'm attaching a very preliminary version of the wifi stuff in german. These suggestions are really just that: suggestions. What I'm trying to avoid is stepping on each other's toes (in the sense of duplicating work). Feel free to contact me by PM for any particular topics out of scope of this thread. |
||
12-27-2011, 05:26 AM | #13 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Oh, one more thing: If you look at the wifi strings, you'll notice there are a LOT of common prefixes/suffixes. These are present in the original file as well, but they involve a lot of copy/pasting. Since this is interpreted JS code, it may be a good idea to factor out the commonalities once, and then simply reuse them.
I'd bet that other translators would also be grateful for such refactorings (which would, in that case, have to be done on the "source" files obviously). |
12-27-2011, 06:29 AM | #14 |
Addict
Posts: 396
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
|
@ixtab:
I have K3W, K4, KT and Fire, so nearly the whole set. But I am not too experienced in programming, just did a hell of translating based on SirAlex work. At least I got a lot of understanding where to find what. K4 not jailbroke yet, because it works well enough in German. Would do, if I could get useful things out of it, i.E. all the buttons in German. Theese I have translated "manually" as well. You know, that Fire is easy to open for all languages? It is just installing a small apk which gives the way to the android localisation. To be found on xda-developers. |
12-28-2011, 02:26 AM | #15 |
Addict
Posts: 396
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
|
I will have to go in the root of K4 to check. If the files are on K4 differentiated in language packages, there should be somehow a way at least to verify on a Touch, if they could be installed. Can not believe, that it is completely incompatible.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 3 localization | JirkaS | Kindle Developer's Corner | 287 | 05-20-2018 10:08 AM |
[K3] Physical keyboard localization | Sir Alex | Kindle Developer's Corner | 112 | 05-19-2018 11:23 PM |
Kindle 4 (no touch) GUI Localization | Sir Alex | Kindle Developer's Corner | 43 | 09-13-2013 07:19 AM |
Keyboard localization (hack) | Sir Alex | Kindle Developer's Corner | 72 | 04-16-2013 03:05 PM |
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch | jbcohen | Which one should I buy? | 4 | 06-18-2011 07:58 PM |