aspose file tools*
The moose likes Beginning Java and the fly likes Properties files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Properties files" Watch "Properties files" New topic
Author

Properties files

Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333

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" ?


OCA7
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2416
    
    7

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.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333

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

Joined: Apr 21, 2012
Posts: 216

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


OCPJP 6 86%
Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333

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
 
subject: Properties files