Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Properties files

 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RBControl.properties – Global
RBControl_zh.properties – Language only: Simplified Chinese
RBControl_zh_cn.properties – Region only: China
RBControl_zh_hk.properties – Region only: Hong Kong
RBControl_zh_tw.properties – Taiwan
Source

Hi

I couldn't figure out what does it mean "Region only" and "Language only" ?

and if that is "RBControl_zh_hk.properties – Region only: Hong Kong"

then why is this "RBControl_zh_tw.properties – Taiwan" ?

why isn't that "RBControl_zh_tw.properties – Region only:Taiwan" ?

 
K. Tsang
Bartender
Pie
Posts: 3222
12
Android Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankita

You may not be familiar with ISO country or language codes but that's ok. "ZH" is the language code for Chinese. All others are country codes, HK for Hong Kong, TW for TaiWan, CN for ChiNa. The probable reason they have "region only" properties file is to set apart the locale for internalization (I18N). Also since your example is Chinese related, which can have traditional Chinese (use in HK and TW) and simplified Chinese used in CN. As for the global properties one is most likely ENglish.

Hope this helps.
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am posting contents of these properties files.

#RBControl.properties
region: global
language: English

#RBControl_zh.properties
language: Simplified Chinese

#RBControl_zh_CN.properties
region: China

#RBControl_zh_HK.properties
region: Hong Kong

#RBControl_zh_TW.properties
region: Taiwan
language: Traditional Chinese

So RBControl_zh_TW.properties file name shows that it contents language code and region code.

RBControl=basename, language code=zh, region code=TW

Now when you see RBControl_zh_HK.properties and RBControl_zh_CN.properties files, there is no language code property.There is only region code.These could be correct for file named with RBControl_HK and RBControl_CN.Correct me if i am wrong.
 
Nikhil Sagar
Ranch Hand
Posts: 216
Java Linux Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ankita modi. wrote:I am posting contents of these properties files.

#RBControl.properties
region: global
language: English

#RBControl_zh.properties
language: Simplified Chinese

#RBControl_zh_CN.properties
region: China

#RBControl_zh_HK.properties
region: Hong Kong

#RBControl_zh_TW.properties
region: Taiwan
language: Traditional Chinese

So RBControl_zh_TW.properties file name shows that it contents language code and region code.

RBControl=basename, language code=zh, region code=TW

Now when you see RBControl_zh_HK.properties and RBControl_zh_CN.properties files, there is no language code property.There is only region code.These could be correct for file named with RBControl_HK and RBControl_CN.Correct me if i am wrong.


Have a look at the illustrated example from the same page you posted above.
LINK
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhil Sagar wrote:Have a look at the illustrated example from the same page you posted above.

My question is about property files not code.That doesn't make any sense.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic