I am facing a problem with Date widget for chinese characters. Chinese language comes with following language codes(zh-TW, zh-CN , zh-sg, zh-hk). I using a tomcat webserver for my application. Requirement is like i need use browser language, if browser language is not supported by plugin then i should use english by default.
To render the date widget, language code is sent to client using below code:
Following code is used to render date for region specific in client:
'''$("Control holder").datepicker('option',$.datepicker.regional["<<Language Code>>"])
If my browser language settings is for "zh-cn" above code from the server returns the language code only i.e "zh" for all chinese language. Above client code now fails to render the date in chinese as there is no specific locale string for "zh" in jquery-ui-i18n.js.
I could fix it by following ways
1. Changing server code to return country code along with language code which requires changes in jquery-ui-i18n.js. Change jquery-ui-i18n.js array index values to have country code with language code.
2. Other possible fix would be to change jquery-ui-i18n.js alone to have keys of language code only.
It looked like all possible ways requires to change jquery-ui-i18n.js is there any way i could fix it without makes changes to jquery-ui-i18n.js.