mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 11:31:26 +01:00
FIX default language defined for IN country
This commit is contained in:
@@ -8192,8 +8192,8 @@ function picto_from_langcode($codelang, $moreatt = '')
|
||||
* Return default language from country code.
|
||||
* Return null if not found.
|
||||
*
|
||||
* @param string $countrycode Country code like 'US', 'FR', 'CA', 'ES', 'MX', ...
|
||||
* @return string Value of locale like 'en_US', 'fr_FR', ...
|
||||
* @param string $countrycode Country code like 'US', 'FR', 'CA', 'ES', 'IN', 'MX', ...
|
||||
* @return string Value of locale like 'en_US', 'fr_FR', ... or null if not found
|
||||
*/
|
||||
function getLanguageCodeFromCountryCode($countrycode)
|
||||
{
|
||||
@@ -8243,12 +8243,12 @@ function getLanguageCodeFromCountryCode($countrycode)
|
||||
'ar-SY',
|
||||
'ar-TN',
|
||||
'ar-YE',
|
||||
'as-IN',
|
||||
//'as-IN', // Moved after en-IN
|
||||
'ba-RU',
|
||||
'be-BY',
|
||||
'bg-BG',
|
||||
'bn-BD',
|
||||
'bn-IN',
|
||||
//'bn-IN', // Moved after en-IN
|
||||
'bo-CN',
|
||||
'br-FR',
|
||||
'ca-ES',
|
||||
@@ -8269,6 +8269,8 @@ function getLanguageCodeFromCountryCode($countrycode)
|
||||
'en-GB',
|
||||
'en-IE',
|
||||
'en-IN',
|
||||
'as-IN', // as-IN must be after en-IN (en in priority if country is IN)
|
||||
'bn-IN', // bn-IN must be after en-IN (en in priority if country is IN)
|
||||
'en-JM',
|
||||
'en-MY',
|
||||
'en-NZ',
|
||||
@@ -8406,7 +8408,7 @@ function getLanguageCodeFromCountryCode($countrycode)
|
||||
$locale_language = locale_get_primary_language($locale);
|
||||
$locale_region = locale_get_region($locale);
|
||||
if (strtoupper($countrycode) == $locale_region) {
|
||||
//var_dump($locale.'-'.$locale_language.'-'.$locale_region);
|
||||
//var_dump($locale.' - '.$locale_language.' - '.$locale_region);
|
||||
return strtolower($locale_language).'_'.strtoupper($locale_region);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user