You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is mixing the mxISO3166 country code with the esISO639 language code. Said in other words, there is no language ISO code mx .
So it would be preferable, to delete the mx line and to create a new attribute called locale . Locale will be using the naming convention of mixing the language and country codes (es-MX) that represents a specific geographical, political or cultural region.
Actually, the translations in PrestaShop follows that locale naming convention (using es-MX in app/Resources/translations directory):
With that new attribute we would be able to create unique locale XML files (like es-MX.xml) to specify all the locale regional information (translations, monetary conventions, decimal formatting conventions, units, date and time formatting conventions and collation/sort order). It would be easier to maintain.
I believe adding this new attribute won't hurt while we put the efforts to create each locale XML file. Also it will be easier to maintain. We could extract the locale data using the website https://www.localeplanet.com/icu/ for each country or region, it won´t be hard.
But I still don´t know how much impact will it have to recode the existing classes. Also, I still need to investigate, the impact on deleting the <language iso_code="mx" /> line.
For now, it appears to be two places where language identifier is used after importing the Mexico language pack.
Inside International / Localization / Languages tab / Edit Español MX shows for Language code = es.
Inside International / Localization / Localization tab / Advanced, the Language identifier = mx.
The second one is totally wrong, PS BO explicitly shows that Language identifier should be the ISO 639-1 code (and mx is not an ISO 639-1).
But it got me thinking, why would you have Language code and Language identifier in two separate places? And how each one pulls its config data (why the first one is es and the second one is mx)?
I would make sense if both fields pulled its data from the same place in LocalizationFiles repository. But the first one is pulled from install-dev/langs/mx/language.xml and the second one from the first <language iso_code="mx" /> occurence in mx.xml.
I will keep trying to figure out the best approach, but it would be nice if somebody else hops in and give us their thinking about this.
The text was updated successfully, but these errors were encountered:
Localization files, in their
\<languages>
tag, are mixing two different ISO codes (ISO 639 language codes and ISO 3166 country codes)For example, in mx.xml it is showing:
Which is mixing the
mx
ISO3166 country code with thees
ISO639 language code. Said in other words, there is no language ISO codemx
.So it would be preferable, to delete the
mx
line and to create a new attribute calledlocale
. Locale will be using the naming convention of mixing the language and country codes (es-MX
) that represents a specific geographical, political or cultural region.Actually, the translations in PrestaShop follows that locale naming convention (using
es-MX
inapp/Resources/translations
directory):With that new attribute we would be able to create unique locale XML files (like es-MX.xml) to specify all the locale regional information (translations, monetary conventions, decimal formatting conventions, units, date and time formatting conventions and collation/sort order). It would be easier to maintain.
Many countries would benefit from it. For example, Belgium which has two locale fr-BE and nl-BE, see the differences https://www.localeplanet.com/icu/fr-BE/index.html and https://www.localeplanet.com/icu/nl-BE/index.html.
I believe adding this new attribute won't hurt while we put the efforts to create each locale XML file. Also it will be easier to maintain. We could extract the locale data using the website https://www.localeplanet.com/icu/ for each country or region, it won´t be hard.
But I still don´t know how much impact will it have to recode the existing classes. Also, I still need to investigate, the impact on deleting the
<language iso_code="mx" />
line.For now, it appears to be two places where language identifier is used after importing the Mexico language pack.
The second one is totally wrong, PS BO explicitly shows that Language identifier should be the ISO 639-1 code (and mx is not an ISO 639-1).
But it got me thinking, why would you have Language code and Language identifier in two separate places? And how each one pulls its config data (why the first one is es and the second one is mx)?
I would make sense if both fields pulled its data from the same place in LocalizationFiles repository. But the first one is pulled from install-dev/langs/mx/language.xml and the second one from the first <language iso_code="mx" /> occurence in mx.xml.
I will keep trying to figure out the best approach, but it would be nice if somebody else hops in and give us their thinking about this.
The text was updated successfully, but these errors were encountered: