How to have an English dashboard on a non-English site
Permalink
A customer of mine has a site that is 100% Dutch. This means that all the plugins and extensions also have to be in Dutch (if available). You can do this in Concrete5 by doing something like
define('LOCALE', 'nl_NL');
in your site.php. For this to work, you need to have the nl_NL locale installed as a language in your Concrete5. The above code achieves that the site's packages, blocks, etc will then render their content in the defined locale, if available.
HOWEVER, this has the distinct disadvantage that the site's administrative parts are *also* rendered in that locale. And that's not cool, because the English translation is much clearer and less, ehm, awkward than the Dutch translation.
So, I spent the previous two hours figuring out how I can configure Concrete5 such that it shows the dashboard and the edit bar in English, and the actual site in Dutch.
It's not as easy as it sounds. Somehow, everything I tried either didn't have any effect, or only partial effect, or it would just show everything in Dutch again.
So, what I eventually came up with is a hack. You can achieve what I wanted (an English dashboard with a Dutch site) by installing an English dashboard translation and marking it as being Dutch.
What you have to do is download the attached file, and put it in 'languages/<xx_yy>/LC_MESSAGES/messages.mo' -- where xx_yy is the language code of the front-end site (in my case: nl_NL for Dutch). Once you have done that, you can change the site's language, either via the dashboard or via some code, and it will always display the Concrete5 parts in English, independent of what language the site is in.
I posted this here in the hopes that it saves someone the same frustrating 2 hour journey I just went on. Good luck!
define('LOCALE', 'nl_NL');
in your site.php. For this to work, you need to have the nl_NL locale installed as a language in your Concrete5. The above code achieves that the site's packages, blocks, etc will then render their content in the defined locale, if available.
HOWEVER, this has the distinct disadvantage that the site's administrative parts are *also* rendered in that locale. And that's not cool, because the English translation is much clearer and less, ehm, awkward than the Dutch translation.
So, I spent the previous two hours figuring out how I can configure Concrete5 such that it shows the dashboard and the edit bar in English, and the actual site in Dutch.
It's not as easy as it sounds. Somehow, everything I tried either didn't have any effect, or only partial effect, or it would just show everything in Dutch again.
So, what I eventually came up with is a hack. You can achieve what I wanted (an English dashboard with a Dutch site) by installing an English dashboard translation and marking it as being Dutch.
What you have to do is download the attached file, and put it in 'languages/<xx_yy>/LC_MESSAGES/messages.mo' -- where xx_yy is the language code of the front-end site (in my case: nl_NL for Dutch). Once you have done that, you can change the site's language, either via the dashboard or via some code, and it will always display the Concrete5 parts in English, independent of what language the site is in.
I posted this here in the hopes that it saves someone the same frustrating 2 hour journey I just went on. Good luck!