[188.8.131.52] Language locale is not saved #4050
When creating a new language, there is no more locale (in the form and DB).
$language['code'] could be used instead but not sure it displays accents correctly (like with fr-FR.UTF-8).
$language['code'] should be the ISO 639 language code with 2 or 3 letters, ex 'gb'.
I find this to be an issue as well, this will require updating and releasing another version of any 3rd party modules that use language in some way, just tested one of my modules on a fresh install of 184.108.40.206 and find it broken in both - admin and store front because of this.
Language in catalog has code set to 'en', in admin it is set to 'en-gb', this breaks my module setting array, as the language code is used as key.
Catalog language object
Admin language object
Are these and other core changes documented anywhere?
There are indeed some changes to the way languages are handled.
To start with: OpenCart 220.127.116.11 doesn't use the DB fields 'directory', 'image' and 'locale'. The name of the language folder always has to be same one as the language code, e.g. something like 'en-gb' or 'de-de'. The language folder also ought to have the image file, e.g. 'catalog/language/en-gb/en-gb.png' or 'catalog/language/de-de/de-de.png' etc.
It looks like the only reason why the database still has the 'image', 'locale' and 'directory' fields in there is for backward compatibility with previous Opencart versions and their language packs.
Having said that, I agree with the previous comments that the 'locale' field should be suppported again for the reasons mentioned by above posters, e.g. the need to use 'locale' in 3rd party extensions.
referenced this issue
Mar 14, 2016
I have tried a workaround, building a locale with the code:
which gives "fr_FR.UTF-8,fr_FR,fr-fr".