Answers.Body: <p>P&amp;T support suggested I disable some plugins to see if there was an issue there and that action made things work...though no idea why really!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-05T16:00:01.350Z
Answers.Text: At least a hotfix :)
  Do you know which plugin caused the error?
Answers.UserDisplayName: Christopher Dosin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T08:46:42.237Z
Answers.Text: Well, i re-enabled them all, so, I really don't know what is going on there!
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-05T15:07:14.333Z
Answers.LastActivityDate: 2020-01-05T15:07:14.333Z
Answers.UserDisplayName: John
Answers.Body: <p>From what i see you maybe have a typo. I think it should be <code>en-GB</code>. At least this is the folder name in the git repo : <a href="https://github.com/craftcms/cms/tree/69bafb027b9e2dc9c8dbede5ad6b4da2706f0650/src/translations/en-GB" rel="nofollow noreferrer">https://github.com/craftcms/cms/tree/69bafb027b9e2dc9c8dbede5ad6b4da2706f0650/src/translations/en-GB</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-01T20:23:13.617Z
Answers.Text: I've tried that one already, didn't work either!! Thanks for the reply btw!!
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T08:10:04.940Z
Answers.Text: Maybe try an app.php instead of site.php That was my issue a while ago.
Answers.UserDisplayName: Christopher Dosin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-05T15:06:07.543Z
Answers.Text: I tried everything, nothing worked! But P&T support suggested I disable some plugin's to see if there was an issue there and that action made things work. No idea why!
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-31T22:00:24.153Z
Answers.LastActivityDate: 2019-12-31T22:00:24.153Z
Answers.UserDisplayName: Christopher Dosin
Body: <p>I have upgraded from Craft2 to Craft3 and static translations no longer seem to work.</p>
  
  <p>I have created a folder at the same level as the "vendor" folder called "translations" and have got a folder inside that called "en_us" (base language is en_gb). Inside that folder we have a file called "site.php" and inside that is the following:</p>
  
  <pre><code>&lt;?php
  
  return [
      '£' =&gt; '$',
      'USD' =&gt; '$',
  ];
  </code></pre>
  
  <p>The static translation page (<a href="https://docs.craftcms.com/v3/static-translations.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/static-translations.html</a>) says: "..To do that, create a new folder in your project’s base directory called translations/, and within that, create a new folder named after the target language’s ID". </p>
  
  <p>I assume that is a typo, but I have tried naming the folder the ID number of the site...</p>
  
  <p>I've also tried renaming the folder to "en-US", "en-us" but nothing seems to work.</p>
  
  <p>Code example for a translation attempt in a template: <code>{{ "£" | t }}</code>.</p>
  
  <p>Any help very gratefully received!</p>
  
Tags: <localization>
Title: Static translations not working on Craft 3 since upgrade from Craft 2
ThreadText: # Static translations not working on Craft 3 since upgrade from Craft 2
  
  (Asked by: username_0 on 2019-12-31)
  
  I have upgraded from Craft2 to Craft3 and static translations no longer seem to work.
  
  I have created a folder at the same level as the "vendor" folder called "translations" and have got a folder inside that called "en\_us" (base language is en\_gb). Inside that folder we have a file called "site.php" and inside that is the following:
  
  ```
  <?php
  
  return [
      '£' => '$',
      'USD' => '$',
  ];
  
  ```
  
  The static translation page (<https://docs.craftcms.com/v3/static-translations.html>) says: "..To do that, create a new folder in your project’s base directory called translations/, and within that, create a new folder named after the target language’s ID".
  
  I assume that is a typo, but I have tried naming the folder the ID number of the site...
  
  I've also tried renaming the folder to "en-US", "en-us" but nothing seems to work.
  
  Code example for a translation attempt in a template: `{{ "£" | t }}`.
  
  Any help very gratefully received!
  
  **Tags:** localization
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2020-01-05. Score: 1
  
  P&T support suggested I disable some plugins to see if there was an issue there and that action made things work...though no idea why really!
  
  > **Comments:**
  > **username_1**: At least a hotfix :) Do you know which plugin caused the error?  
  > **username_0**: Well, i re-enabled them all, so, I really don't know what is going on there!  
  
  ---
  
  ### Answer by username_1 on 2019-12-31. Score: 1
  
  From what i see you maybe have a typo. I think it should be `en-GB`. At least this is the folder name in the git repo : <https://github.com/craftcms/cms/tree/69bafb027b9e2dc9c8dbede5ad6b4da2706f0650/src/translations/en-GB>
  
  > **Comments:**
  > **username_0**: I've tried that one already, didn't work either!! Thanks for the reply btw!!  
  > **username_1**: Maybe try an app.php instead of site.php That was my issue a while ago.  
  > **username_0**: I tried everything, nothing worked! But P&T support suggested I disable some plugin's to see if there was an issue there and that action made things work. No idea why!  
  
  ---
  
  