2

I currently have a Craft 2 site deployment with a translations folder and a en_gb.php translations file.

I would be able to use expressions like this: {{"visualization"|t}}

However, this does not work in Craft 3. What is the new format for translation in Craft 3?

6

You can see the changes made to static translations in Craft 3 in the Craft 3 upgrade docs here:

https://docs.craftcms.com/v3/changes-in-craft-3.html#static-translation-files

In your case, craft/translations/en_gb.php would need to change to craft/translations/en-GB/site.php.

  • I'm confused by this answer because there is no longer a "craft" folder in Craft3 aside from whatever you might find inside the vendor folder. I'm not really supposed to put files manually inside the vendor folder, am I? – SublymeRick Nov 6 '17 at 20:41
  • 1
    Just make a translations folder alongside the root of your project where vendor lives. – Brad Bell Nov 6 '17 at 21:17
  • The link no longer works. – Johann Dyck Apr 5 '18 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.