Internationalization Problem
Hi,
That is spec. issue, if the language is en, the loader will directly use i3-label.properties prior to i3-label_en.properites, if any.
BTW, we'll add the developer's guide more clear.
/Jumper
Hey Jumper,
But I got confused. Can you make it clear? What is the order?
Let me give you an example. Say the Locale is en_AU (English Australia) and I have the following files in my WEB-INF folder:
i3-label_en_US.properties (English United States)
i3-label_en.properties (English)
i3-label.properties (Default Language)
Which one are you going to use? From what you say, I understand that you will directly use the third one (i3-label.properties), although I have a language file for English.
Hi,
From your sample, when the Locale is en_AU, the i3-label_en.properties will be ignore, and the i3-label.properties will be used. The exception only appears in English Locale. Another case, if the Locale is en_US, the i3-label_en_US.properties will be used, in other words, if the Locale is en, the i3-label_en.properties will be ignore, and the i3-label.properties will be used, because the ZK loader treats the i3-label_en.properties as well as i3-label.properties.
In other language, for example, the Locale is de_DE, if the i3-label_de_DE.properties is not found, the i3-label_de.properties will be used, if any. Otherwise, the i3-label.properties is assumed.
So if I understand it correctly, you say that there's an exceptional case for English language! And the file i3-label_en.properties will never ever be read under any circumstance! Is that what you say? Instead of i3-label_en.properties ZK will always use i3-label.properties!
And for that reason, I have to make the content of the default file i3-label.properties English!
For example, if the locale of the user is en_AU, and if I don't have that specific file (i3-label_en_AU.properties) ZK will directly go for i3-label.properties by-passing i3-label_en.properties!
To sum it up:
1) Never ever create a file i3-label_en.properties. Because ZK will never read it!
2) Your default language file i3-label.properties MUST be in English!
Hi,
You are right, and we decide it to be a bug.
I post here, please follow it.
We will fix it as well as the order of the other language.
/Jumper
Great, thanks ;)
ZK - Open Source Ajax Java Framework
Hello all,
With the latest version (currently 3.5.2) of ZK I am experiencing an i18n problem.
According to the Developer's Guide:
"if the Locale is de_DE, then WEB-INF/i3-label_de_DE.properties will be loaded. If no such file, ZK will try to load WEB-INF/i3-label_de.properties and WEB-INF/i3-label.properties in turn."
But it does NOT work so!
I only have i3-label_en.properties and i3-label.properties files in my WEB-INF folder (Watch out! I do NOT have i3-label_en_US.properties)
If the Locale is en_US (or en_UK, en_AU, etc.) I expect it to use the i3-label_en.properties since there is no country specific file, such as i3-label_en_US.properties. But it DOES NOT! It uses the default file i3-label.properties instead!
Am I thinking or doing something wrong? Or is this a bug?