Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#5608 closed bug (notabug)

Date widget issue with chinese characters

Reported by: mailarunkumar Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.7.2
Keywords: Date widget in chinese characters Cc:
Blocked by: Blocking:


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.
  1. Other possible fix would be to change jquery-ui-i18n.js alone to have keys of language code only.

I tried using javascript navigator.language value but it gives system language in FF i require browser language.

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.


Change History (3)

comment:1 Changed 13 years ago by rdworth

Resolution: invalid
Status: newclosed

Please ask questions on the forum:


comment:2 Changed 13 years ago by rdworth

Component: ui.coreui.datepicker

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.