There is no license information available for the latest version (1.2.3) of this package.

Translates formatted date strings to the locale set with i18n::set_locale() if there is a matching language file.

Installs: 840

Dependents: 0

Stars: 8

Watchers: 3

Forks: 9

Open Issues: 4

Type: silverstripe-module

1.2.3 2014-08-20 11:19 UTC


LocalDate translates formatted date strings if there is a matching language file.


  • SilverStripe 3.1



  1. Drop the module into your SilverStripe project and run /dev/build
  2. Set the correct locale in your project _config.php using i18n::set_locale('xx_XX');

You may also set the language manually using LocalDateHelper::setLocale('xx_XX'); at any time.


The module will extend and override SS_Datetime and Date. Existing dates will be automatically translated as long as a valid language file exists as long as they are of SS_Datetime or Date type.

The locale for the translated date is based on (in order):

  1. Any valid locale set with the LocalDateHelper::setLocale('xx_XX');
  2. The current locale for Translatable if the module is installed
  3. The current i18n-setting

If the language file for your locale is missing you can easily create it yourself. Simply use one of the included language files as a template and save it to your /mysite/lang folder. Better yet, fork this repo and add it to the lang-folder and send me a pull request. Sending me an email ( with the translated file attached will also do the trick.