PrestaShop / LocalizationFiles

Contains localization data for PrestaShop shops
https://i18n.prestashop.com/
1 stars 14 forks source link

Homologate language.xml files to PrestaShop / LocalizationFiles repository #44

Open rickygzz opened 2 years ago

rickygzz commented 2 years ago

install-dev/langs directory inside PrestaShop/PrestaShop repository contains locale information that should be maintained inside this repository (PrestaShop / LocalizationFiles).

It seems the data is pulled for the unique time during installation, and never used again. So it forces the user to manually update the settings in order to change the locale information.

I am thinking of creating unique XML locale files for each language-COUNTRY (like es-MX.xml, fr-BE.xml and nl-BE.xml) containing this information (locale code, language code, date format, RTL) and additional information (decimal separator, time format, etc.)

This will allow the users to update the locale settings from the backoffice using the language-packs.

eternoendless commented 2 years ago

I think most of the information there is meant to be removed sooner rather than later.

I am thinking of creating unique XML locale files for each language-COUNTRY (like es-MX.xml, fr-BE.xml and nl-BE.xml) containing this information (locale code, language code, date format, RTL) and additional information (decimal separator, time format, etc.)

This exists already, it's all standardized in the CLDR database: https://github.com/PrestaShop/PrestaShop/tree/develop/localization/CLDR

Currently, everything regarding price format, currency symbol and decimal separator is already handled by our CLDR reader. The whole localization pack stuff would benefit from some cleanup because some data in it is redundant with CLDR, we kept it for backward compatibility with older versions but we don't use it anymore.

What we are missing is the date formats and the units, which exist in CLDR but are currently read from the packs and the installation fixtures.

IMO the packs should include only local information, especially the one that's subject to change:

This information is currently not included in localization packs and could be added so that it can be updated:

This information is currently included in install fixtures: