Page 1 of 1

Problem with multi-spanish website (Spanish, Mexican)

Posted: Wed Jul 27, 2016 10:52 am
by mikazaru2000
Dear all,

I would like to ask you about the following problem:
I am using a multi-language website with Joomla 2.5, and it works well.
But now my customer wants to have Mexican page besides the Spanish one.
Actually it's the same content and regional idioma are also not the big thing, but I want to choose between the Spanish flag and the Mexican flag in the language switcher.
The problem now is that there is no es-MX language pack for Joomla 2.5. Also, I cannot choose the same language pack for two languages.
Does anyone have a solution to this problem?

Thousand thanks in advance!
mikazaru

Re: Problem with multi-spanish website (Spanish, Mexican)

Posted: Wed Jul 27, 2016 3:37 pm
by imanickam
You could create a es-MX language pack from the language pack es-ES as follows:
  • Unzip the files from the language pack es-ES
  • Rename the files that starts with es-ES to es-MX
  • Edit the files named es-MX.localise.php and change the abstract class name from Es_ESLocalise to Es_MXLocalise
  • Edit the xml files and change the language tag from es-ES to es-MX
  • Edit the xml files and change the language name accordingly
  • Repackage the language pack
Review of the document https://docs.joomla.org/J3.1:Making_a_L ... for_Joomla would be of help in understanding the process.

Alternatively, you could use the extension Localise (http://extensions.joomla.org/extensions ... n/localise) to create the es-MX language pack from the language pack es-ES.

Note: Be informed when you create Content Languages, you have to use different URL Language Code for each of these languages.

Re: Problem with multi-spanish website (Spanish, Mexican)

Posted: Wed Jul 27, 2016 6:41 pm
by mikazaru2000
Thank you, imanickam!

I already thought about solution no. 1. Since the language pack contains several hundred files that have to be renamed, it's quite complicated.
Solution no. 2 is only available for Joomla 3. Or does it work with 2.5, too?
If you have further ideas, it would be great.
Thank you!

Re: Problem with multi-spanish website (Spanish, Mexican)

Posted: Thu Jul 28, 2016 2:44 am
by imanickam
mikazaru2000 wrote:no. 1. Since the language pack contains several hundred files that have to be renamed, it's quite complicated.
You could do this on your local pc/laptop. Renaming of the files need not be one by one. If it is Windows then you can use the command prompt and similar facility should be available in other environments such as Mac.
mikazaru2000 wrote:no. 2 is only available for Joomla 3. Or does it work with 2.5, too?
Yes, it is true; the package works only in Joomla! 3.x. Also, with this method, things should be done in a convoluted way. In the light of this, I would suggest using the method 1.


Note: Be informed that Joomla! 3.x language packs could be installed on Joomla! 2.5. However, there could be some language string changes. You have to try it out on your site.

Re: Problem with multi-spanish website (Spanish, Mexican)

Posted: Thu Jul 28, 2016 7:34 am
by mikazaru2000
Thanks so much for your inspiration, Ilagnayeru!

It worked with method no. 1.
I used the Bulk Rename Utility for the file names, and Notepad++ for the stuff inside the files.

Best regards
Mikazaru