• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Properties files

 
Ranch Hand
Posts: 333
Firefox Browser Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" ?

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 216
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
It was the best of times. It was the worst of times. It was a tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic