We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Translating date strings and other things

How Do I?

Robin Sowell's avatar
Robin Sowell
13,252 posts
one year ago
Robin Sowell's avatar Robin Sowell

How do i translate entry date strings?

Tue 16 Jan 2024 (EN) needs to become di 16 jan 2024 (NL) I want to translate the days and months, what would be the most elegant way to do this? I did it before with JavaScript but if anyone else has a different solution I’d love to hear it. Thanks!

Join our Slack channel!

       
Robin Sowell's avatar
Robin Sowell
13,252 posts
one year ago
Robin Sowell's avatar Robin Sowell

There are a number of ways to approach this, but the standard native approach to translating EE system output words/phrases is via Language files/packs.

In system/ee/languages/ there is the default English file, that contains all of the system words and phrases EE outputs. That applies to frontend and backend system generated content.

You should never edit/add files in system/ee - they could be replaced. But, you can edit the english language words or add additional languages in system/user/language/. Each language should have its own folder. If you put an english folder in there, you can override the default english version. You can even just put a single file- that file will override the default, and it will fall back to the default files.

You can add more languages by adding folders containing translated versions of the files. And you can select which folder/language the file uses as the default in the settings. Logged in members can choose their own language preferences from the options available.

You can download user created language packs from the github repo or use the Translator utility to make/edit your own.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.