jQueryMobile - DateBox

Home

Internationalization

Some internationalization support is complete. To use, simply link the appropriate file(s) from: http://dev.jtsage.com/cdn/datebox/i18n/. It must be loaded after datebox. Note that the last file loaded will be the "default" language.

Contributing

The contribution system has been moved to gettext - this streamlines the submission process significantly. You can submit translations at crowdin.

If you prefer, the project .pot file is here: datebox.pot

Finally, you can generate the following:

jQuery.extend(jQuery.mobile.datebox.prototype.options.lang, {
    'en': {
        setDateButtonLabel: "Set Date",
        setTimeButtonLabel: "Set Time",
        setDurationButtonLabel: "Set Duration",
        calTodayButtonLabel: "Jump to Today",
        titleDateDialogLabel: "Set Date",
        titleTimeDialogLabel: "Set Time",
        daysOfWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
        daysOfWeekShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
        monthsOfYear: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
        monthsOfYearShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        durationLabel: ['Days', 'Hours', 'Minutes', 'Seconds'],
        durationDays: ['Day', 'Days'],
        tooltip: "Open Date Picker",
        nextMonth: "Next Month",
        prevMonth: "Previous Month",
        timeFormat: 12,
        headerFormat: '%A, %B %-d, %Y',
        dateFieldOrder: ['m', 'd', 'y'],
        timeFieldOrder: ['h', 'i', 'a'],
        slideFieldOrder: ['y', 'm', 'd'],
        dateFormat: '%m/%d/%Y',
        useArabicIndic: false,
        isRTL: false,
        calStartDay: 0,
        clearButton: 'clear'
        durationOrder: ['d', 'h', 'i', 's'],
        meridiem: ['AM', 'PM'],
        timeOutput: '%k:%M', // 12hr: '%l:%M %p', 24hr: '%k:%M',
        durationFormat: '%Dd %DA, %Dl:%DM:%DS',
        calDateListLabel: 'Other Dates',
		calHeaderFormat: '%B %Y'
    }
});
jQuery.extend(jQuery.mobile.datebox.prototype.options, {
    useLang: 'en'
});

Multiple languages can be loaded at once, simply change options.useLang (even in realtime) in order to switch the language. See this for an example.

If you wish to have your translation included in datebox, either fork your own copy at github and send me a pull request, or simply e-mail me the file jtsage+datebox@gmail.com.

Special Thanks: