1

I've read all posts about localization and translation here and at Craft's documentation, but I still haven't found the answer.

What I want achieve here is having let's say UK instead of British English.

I found paragraph in documentation:

{{ "Welcome, {name}"|t({ name: user.friendlyName }) }}

that says: If your text contains dynamic variables, add tokens to the string where they should go, and pass an object to the t filter that contains their values

Could anything like that work by passing object to _locale.php in /translations folder and set other value? Tried, without effect. Theoretically it could work, craft would pass the object of an active locale to our translation's file.

Any advice, so I don't waste time on something that can't be done.

3

Can't be done, don't waste your time.

Only thing that could work is via a static translations file, but the CP gets locale name data directly from that yii language file, so this is your only chance (see dupe question). Other things can be overwritten though, e.g 'Users' => 'Members'.

| improve this answer | |

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.