1

I am developing multi-sites with the locals. Everything is fine. Is it possible to change the name of locals. I 'd like to give some other names to locals so that those can be more clear while managing the contents.

Please guide me for it.

1

1 Answer 1

5
+25

You could add new pseudo localization files to Craft craft/app/framework/i18n/data/ and rename (translate) the name of your "language" and other things in these files.

I'd use en.php as a starting point and save it as en_custom.php. Then add a new key/value pair 'en_custom' => 'My Custom Country' to the languages array (line 205 ff.), which is responsible for the translation of the language names.

9
  • Probably worth noting that modifying anything in the craft/app folder is generally considered bad practice... Your changes can (and likely will) disappear during a future auto-update. That all being said, modifying the core might be your only option here. (reluctant +1)
    – Lindsey D
    Jan 20, 2015 at 18:31
  • Yes, this is no nice solution (as is to mis-use locales to get some sort of multi-site feature to begin with!!). But it works and auto-update probably doesn't do any harm to "unknown" localization files (Craft can't know if this is a real country, does it?).
    – carlcs
    Jan 20, 2015 at 19:05
  • Hmm, interesting theory. You might be right that "invented" localization files would be safe, but I personally would hesitate to take that risk. I generally think of auto-updates along the lines of git syncing... ie, "everything in its right place". But you're definitely right (unless P&T says otherwise) that there's no way to do this without tapping into the craft/app folder.
    – Lindsey D
    Jan 20, 2015 at 19:09
  • 1
    The only time it would be overwritten during an auto-update is if, instead of only sending a diff of patched files down, we decide to just swap out the whole app folder cart blanche. I think we've only done that once during a Yii update that touched so many files (thousands) it was less work just to swap out the whole folder.
    – Brad Bell
    Jan 20, 2015 at 19:39
  • 1
    @LindseyD There is about a 100% chance that Craft 3 is going to be a manual update only.
    – Brad Bell
    Jan 21, 2015 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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