2017 © Pedro Peláez
 

silverstripe-module silverstripe-localdate

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

image

richardsjoqvist/silverstripe-localdate

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

  • Wednesday, April 18, 2018
  • by richardsjoqvist
  • Repository
  • 2 Watchers
  • 7 Stars
  • 3,937 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 0 Open issues
  • 9 Versions
  • 7 % Grown

The README.md

LocalDate SilverStripe module

LocalDate translates formatted date strings if there is a matching language file., (*1)

Requirements

  • SilverStripe 3.1 (this module will probably not be updated to SilverStripe 4)

Notes

Installation

  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., (*2)

Usage

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., (*3)

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

  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 (richard@spiro.se) with the translated file attached will also do the trick., (*5)

The Versions

18/04 2018

dev-master

9999999-dev https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

04/01 2016

1.3.1

1.3.1.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

04/01 2016

1.3.0

1.3.0.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

20/08 2014

1.2.3

1.2.3.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

20/01 2014

1.2.2

1.2.2.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

06/12 2013

1.2.1

1.2.1.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

02/12 2013

1.2.0

1.2.0.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

23/05 2013

1.1.0

1.1.0.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate

03/05 2013

1.0.0

1.0.0.0 https://github.com/richardsjoqvist/silverstripe-localdate

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

  Sources   Download

The Requires

 

date module locale silverstripe localdate