Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize date meta #150

Merged
merged 2 commits into from
Apr 21, 2015
Merged

Localize date meta #150

merged 2 commits into from
Apr 21, 2015

Conversation

pschmitt
Copy link
Contributor

Use strftime() instead of date() so that non-english websites can
display the date meta in their locale. The locale can be set with
setLocale(LC_ALL, 'YOURLOCALE').
Please note that this changes the date format.
More information: http://php.net/strftime

Use strftime() instead of date() so that non-english websites can
display the date meta in their locale. The locale can be set with
setLocale(LC_ALL, 'YOURLOCALE').
Please note that this changes the date format.
More information: http://php.net/strftime
@yuwash
Copy link

yuwash commented May 30, 2014

👍 For php-non-experts, an example setLocale in the config.php file could be useful. (replacing the $config['date_format'] or adding to it, if it still seems to be useful)

picocms added a commit that referenced this pull request Apr 21, 2015
@picocms picocms merged commit eb494c0 into picocms:master Apr 21, 2015
@dkyme
Copy link

dkyme commented Mar 21, 2016

Since I'm a php-non-expert, where do I got to add the setLocale?
My German Page looks strange with English Months

@PhrozenByte
Copy link
Collaborator

@dkyme, simply add e.g.

setlocale(LC_TIME, 'de_DE.utf8');

to your config/config.php. You can get a list of available locales by running locale -a on your server's shell.

The use of strftime() and setlocale() is fraught with problems in some environments, thus this is kind of a workaround; we're planning to release a official i18n plugin with Pico 1.1, see #334.

@dkyme
Copy link

dkyme commented Mar 22, 2016

Thank you @PhrozenByte , works fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants