- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020
11:28 PM
10-14-2020
11:28 PM
we need to add new custom locale
We need to add a new locale no_NO to our website
This locale must be shown in locales list in Store->Configuration->General->Locale Options->Locale
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2020
10:30 PM
10-16-2020
10:30 PM
Re: we need to add new custom locale
Hello @suj_eet
You can add in runtime without adding in database :
/vendor/magento/module-config/Model/Config/Source/Locale.php
public function toOptionArray()
{
//return $this->_localeLists->getOptionLocales();
$localeLists=$this->_localeLists->getOptionLocales();
$localeLists[] = ['value'=>'kb_IQ', 'label'=>"Kurdish Bahdini (Iraq)"];
$localeLists[] = ['value'=>'ks_IQ', 'label'=>"Kurdish Sorani (Iraq)"];
return $localeLists;
}
Hope it helps !
Problem Solved ? Click on 'Kudos' & Accept as Solution !
