Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rickygzz opened this issue Jan 2, 2022 · 1 comment

Comments

@rickygzz
Copy link
Contributor

rickygzz commented Jan 2, 2022

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
Copy link
Member

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:

  • Official languages (only the ones supported by PrestaShop, ofc)
  • List of official currencies (iso code & symbol only if not included in CLDR)
  • List of provinces/states/regions
  • List of taxes

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

  • Postal code format
  • Address format
  • Requires tax id
  • Display tax label

This information is currently included in install fixtures:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants