AbanteCart Development > Idea Polls
Setting id of languages according to the alphabetic list ISO 639-1
(1/1)
OneMore:
Hello,
As AbanteCart likes standardization, I would suggest numbering languages according alphabetical list for the ISO 639-1 codes from the International Organization for Standardization.
This would mean that "language_id" would be set to:
* 41 for English (instead of default 1)
* 149 for Spanish
* 29 for Chinese
* 55 for German
* 48 for French a.s.o.
instead of being attributed by the auto increment.
If developers of language extensions would follow this simple rule, it would be much easier to create datasets that can be easily be imported by every user of AbanteCart.
Consider for instance how zone descriptions can be imported by SQL queries:
--- Quote ---INSERT INTO `ac_zone_descriptions` (`zone_id`, `language_id`,`name`) VALUES (...,...,'')
--- End quote ---
Of course, some languages will probably never be imported, like dead ones (e.g. 93,'Latin','la), but it would just suffice to check the list to know which id should be used for each language.
I have prepared the full CSV list of 183 languages, alphabetically ordered, as well as the SQL query equivalent for AbanteCart's list languages list.
I hope there will be some traction for this practice. Writing a few updaters for existing shops should not be a big issue.
Awaiting for your feedback.
Basara:
Hello.
The ID is just a number from the database. When a language extension is installed it provides all the necessary configuration like locales to detect the language
OneMore:
Hello,
Yes, I am aware that extensions do the job of matching language IDs and language codes.
But making a new installable extension requires some time.
Often, I simply create datasets as SQL queries that I inject through the SQL tab of phpMyAdmin, without taking the time to create an extension.
In such a case, having a unequivocal "language_id <> language_code" relationship would make sharing datasets between users easier.
One would only have to copy-paste the dataset in phpMyAdmin's SQL tab, without having to care about the id to language code relationship.
Hence, the idea of using the ISO 639-1 alphabetical list.
E.g. if creating some SQL dataset in French language, the language_id would be set to 48.
Navigation
[0] Message Index
Go to full version