I have a craft installation (that's up to date), that was installed with english as the system language. Now that Craft has quite a lot of system languages, is there a way to change to another language for the control panel?
-
possible duplicate of Set site locale to display correct date format in date/time field– carlcsCommented Dec 1, 2014 at 10:30
-
@carlcs Yeah, answer is the same, but it wasn't because of date formats that I wanted to change the system language.– peirixCommented Dec 1, 2014 at 15:48
-
Yep, sorry. Also noticed this shortly after a hit the dupe button.– carlcsCommented Dec 1, 2014 at 15:49
2 Answers
If you're running Craft Personal or Client, you'll need to go to the craft_locales
table in your database and change the locale to one of the support Craft control panel translations (http://buildwithcraft.com/help/cp-languages).
If you're running Craft Pro, you can go to Settings->Locales and add (and re-order) new locales to your site. Then you can go to your user account settings and set your preferred locale from list of existing site locales and the CP will display in that. Again assuming it's one of the locales that the control panel has already been translated into.
-
Yeah, I'm using Personal, so that's why I didn't find anything in the Settings area. Thanks.– peirixCommented Nov 30, 2014 at 17:57
This solutions works for any locale, even if you don't have it installed as a front-end locale. It also works for Personal or Client Craft installs.
Add a translations file into craft/translations/xx.php named after the currently selected user locale or system locale for Craft Personal installs and use this code to include any locale's translations you want. You can also customize it further by overwriting select translations:
<?php
namespace Craft;
if (craft()->request->isCpRequest())
{
$en = (include '../craft/app/translations/en_us.php');
$custom = array(
'Globals' => 'I freak out!',
);
return array_merge($en, $custom);
}
return array();
-
One downside of this approach: it doesn't override plugin translations (if you don not include them aswell).– carlcsCommented Dec 2, 2015 at 21:53