3

I will work in a website that have presence in 3 countries: Nicaragua, Panama, Costa Rica. They will upload products and want that each country have they own product or product information.

So i think about locales to organize the website, to give 3 different contexts to load information, and the ability to change a existing product for each country.

My question is: this 3 countries speaks Spanish, and i want to clearly show the client which country he is editing- Can i duplicate the Spanish locale and put the country name on each one ( to show PANAMA-COSTARICA-NICARAGUA ) ? I see the list of locales but i don´t know if this 3 countries are available... Thanks!

Sebastian.

6

Yes you can do this by going to the craft/app/framework/i18n/data folder and copying the language file for each occurrence. You must give each a unique name es_pn, es_co, es_nc. Inside each of those files you must add each of those names along with the long form name.

languages => array(
'es_pn' => 'Panama',
'es_co' => 'Costarica',
'en_nc' => 'Nicaragua',

From here you would select each of those locales from the CP and setup the rest of your site as you would for multiple locales, using your custom ones. Updates have currently never broken this. We have been using this method for several clients, it works well.

| improve this answer | |
  • Aran, thanks for yor reply and share your experience and knowledge! You give me a kickstart for my project, i will implement your solution. Thanks and happy new year! :) – Sebastián. Dec 31 '15 at 19:40

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.