DateBox is full localized, nearly every aspect of the user interface can be altered based on the user’s locale.
Picking a Language File
Language files are available at: https://cdn.jtsage.com/jtsage-datebox/i18n/
Picking a Language on the Fly
Choosing a language on the fly is possible, although it is far more recommended that you serve only the required language to the end-user. The option you will want to alter is “useLang”
Please note that if you load multiple files, the “default” language is whatever file loads last - please be sure to specify, as if a load is to hang slightly, the behavior may be unpredictable.
Overriding just a few values
Sometimes, it is more appropriate to just override a few values - for this purpose you can use the “override” option sequence:
For a full list of localization string names, please look below - note the use of camel case - i.e. “dateFormat” becomes “overrideDateFormat”
Customizing a Language
The simplest way to customize a language is to edit or create a file with all of the needed strings for datebox. The file looks something like this:
Of particular note, the line before last, and the second line contain the language name - it can be whatever you like, but if you choose to load multiple files on a page the name must be unique. Most values are optional, if you choose not to supply them datebox will fall back to the default values defined in the CORE file. This is particularly useful as you shouldn’t need to track the main distribution to ensure your existing language files will work with new versions. For a complete listing of what each of these options means, please see the API.
Correcting Mistakes / Submitting New Translations
If you wish to correct a mistake in the DateBox repository, or submit a language that does not already exist, you can send a merge request via GitHub, send me an e-mail direct, or contribute via CrowdIn.