I want to use different version of Chinese - traditional and simplified.
We have used zh-Hant and zh-Hans for those on non CQ prjects that has dependency on CQ.
Can i customize these languages in CQ so that it could be same across different project.
Currently it is supported as zh_tw, zh_cn (/libs/wcm/core/resources/languages) . My concern is whether i can use zh-Hant and zh-Hans for languages.
If i use different lang code , the language list is not populated in Translation section in sidekick.
I was attempting to do something similar recently - in my case we were trying to use jp instead of ja for a Japanese site. There is a way to make this work, but there is one potential issue to be aware of. You can create a content tree using any arbitrary path then explicitly set the language for that tree. In your case you would do the following:
There is a potential issue with this approach however. If you need to retrieve the language of the page in your JSP code you'll need use the following syntax:
Passing false to the getLanguage method forces CQ to look for the jcr:language property, which in this case will return a Locale object matching 'zh_cn'. If instead you pass true to getLanguage CQ will only search in the path for an ISO language code. Since zh-Hans is not a valid ISO code none will be found and the default Locale will be returned , which is most likely not what you want.