Skip to main content

Search and Top Navigation

#5608 closed bug (notabug)

Opened May 12, 2010 08:06AM UTC

Closed May 12, 2010 09:02AM UTC

Last modified October 11, 2012 09:15PM UTC

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.

2. 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.


Attachments (0)
Change History (3)

Changed May 12, 2010 09:02AM UTC by rdworth comment:1

resolution: → invalid
status: newclosed

Please ask questions on the forum:


Changed May 12, 2010 09:02AM UTC by rdworth comment:2

component: ui.coreui.datepicker

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted