[Q] - Add Dutch language


Apr 20, 2012
7
0
11
#1
Dear users,

I've succesfully decompiled FileExplorer.apk copied the folder "values-en" and renamed it "values-nl" and edited the xml files. Then I re-compiled it and Signed it. Then I pushed it back to the ROM (overwrote the old FileExplorer.apk).

But, under Settings => Full Settings => Language & Input => Language there is no Dutch or Netherlands,

now I was wondering, what did I miss?

Kind regards :)

Btw; The Miui.nl is somewhat dead.. so I want to translate it myself..!
 

iBotPeaches

Script Gatekeeper
Oct 31, 2011
3,811
1,121
335
#2
Just because you did one APK, doesn't mean it will pop up in the settings. I believe you must do

framework-res, framework-miui-res, and settings for that setting. Also, don't overwrite.

Copy and have both values-en and values-nl
 

MarkHUK

Xiaomi.eu Founder
Staff member
Nov 6, 2010
4,366
2,152
322
#3
Just because you did one APK, doesn't mean it will pop up in the settings. I believe you must do

framework-res, framework-miui-res, and settings for that setting. Also, don't overwrite.

Copy and have both values-en and values-nl
just frames :) but the locale must cascade to all apks e.g. values-nl for every other apk for the locale to be picked up by the framework global locale
 
Apr 20, 2012
7
0
11
#4
Thanks guys! At the moment I'm looking for an easy way to add the Dutch language, trying to automate it a little bit :) And I guess, that once I've added it, I don't have to translate everything, every week again :)
And I'm writing an app that fixes the framework-miui-res.apk broken xml files.. Quite annoying :(

EDIT: I've build an App to "translate" it quite easy.. however, I've encountered this:
<string name="app_name">An App Name</string>
<string name="something">There is some
text here</string>
<string name="title">Title</string>

Now as you can see, the string with the name "something" is not on the same line, does this matter? Because my App fails to do this correctly.. it can only handle when the string is on one line (like this:)

<string name="app_name">An App Name</string>
<string name="something">There is some text here</string>
<string name="title">Title</string>
 

iBotPeaches

Script Gatekeeper
Oct 31, 2011
3,811
1,121
335
#5
Build your app to include new lines?

If your using regex you can check for carriage return and new line feeds. ( \r \n)
 
Apr 20, 2012
7
0
11
#6
Sorry, I should have been clearer.

To translate miui from English to Dutch I use the translated xml files from the Dutch GB miui. To make it easier, I made an app / program that replaces the English sentences with the Dutch sentences (if the sentence is available), but since I read the file line by line, sometimes I get half sentences.

Like in the strings.xml from antispam apk, on about 2/3 of the file there are two lines split. So I was wondering, does it matter if I put it back to one line instead of two?

Thanks in advance :)
 
Apr 20, 2012
7
0
11
#8
I've also tried it that way, using an XML reader, but look here, please:
Original strings.xml XML source from the AntiSpam.apk (link):
Code:
  <?xml version="1.0" encoding="utf-8"?>
  <resources>
  <string name="fw_blacklist_hint">"Berichten en oproepen van de zwarte lijst
  worden geblokkeerd"</string>
  <string name="fw_whitelist_hint">"Berichten en oproepen van witte lijst
  worden niet geblokkeerd"</string>
  </resources>
Now you can see, that the sentence fw_blacklist_hint and fw_whitelist_hint is split in two lines.

And this is the same code, but when read by an XML reader (link) :


Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="fw_blacklist_hint">"Berichten en oproepen van de zwarte lijst worden geblokkeerd"</string>
<string name="fw_whitelist_hint">"Berichten en oproepen van witte lijst worden niet geblokkeerd"</string>
</resources>
I hope you understand what I mean :p
And thanks in advance :)
 

MarkHUK

Xiaomi.eu Founder
Staff member
Nov 6, 2010
4,366
2,152
322
#9
it wont matter if they go onto a new line but its always good to try and tidy them up if you are editing :)
 

MarkHUK

Xiaomi.eu Founder
Staff member
Nov 6, 2010
4,366
2,152
322
#11
Ah, Oké! I thought, maybe it's split because of the formatting. Now, I can continue to finish the program :)
apktool causes the issue, i've cleaned MOST of my XML up. If you are using my base for any work please be sure to credit it properly.

Thanks,
Mark
 
Apr 20, 2012
7
0
11
#12
APKtool is also messing up the framework-miui-res XML files, right? Currently I use your (English) decompiled MIUI, do you have the XML somewhere around here?

And credits, of course, without the English MIUI I wouldn't be able to translte it properly :)
 
Apr 20, 2012
7
0
11
#14
Mark, thank you!

I appreciate your quick replies :)
I'll post the result in the Dutch topic, and if you're interested in the "framework-miui-res XML fixer", just let me know :)

Kind regards,
Kevin :)
 

MarkHUK

Xiaomi.eu Founder
Staff member
Nov 6, 2010
4,366
2,152
322
#15
Mark, thank you!

I appreciate your quick replies :)
I'll post the result in the Dutch topic, and if you're interested in the "framework-miui-res XML fixer", just let me know :)

Kind regards,
Kevin :)
Dont need a framework "fixer" my XML compiles fine from GitHub... thanks though :) and no problems regards to replies :)