You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
robocoder opened this issue
Jan 15, 2009
· 6 comments
Assignees
Labels
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
- core/Common.php: extractLanguageCodeFromBrowserLanguage returns the country code;
should rename this to extractCountryCodeFromBrowserLanguage and add a new extractLanguageCodeFromBrowserLanguage function
- plugins/LanguagesManager/LanguagesManager.php: calls above function, extractLanguageCodeFromBrowserLanguage, expecting a language code, but for “en-ca”, it gets “ca” (Catal) instead of “en”
- Visitors | Locations & providers | Countries data table shows “Unknown” for “en-US”; need to call strtolower(), probably in core/Common.php’s getBrowserlanguage()
The text was updated successfully, but these errors were encountered:
Updated patch (and new file):
- config/global.ini.php: added config option ‘enable_language_to_country_guess’ to turn on the language to country guess (when no region provided in the preferred language tag)
- core/DataFiles/LanguageToCountry.php: new
- core/DataFiles/Countries.php: updated with respect to ISO 3166-1 alpha-2 list
- lang/en.php: updated with respect to above
- tests/core/Common.test.php: more tests
- core/Common.php: lots of changes
(In 1038) refs #504 – check that valid_languages and valid_countries is not null;
http://ca2.php.net/manual/en/function.in-array.php#86695 describes
in_array() returning true if haystack is 0 or false, and not in strict
mode
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
- core/Common.php: extractLanguageCodeFromBrowserLanguage returns the country code;
should rename this to extractCountryCodeFromBrowserLanguage and add a new extractLanguageCodeFromBrowserLanguage function
- plugins/LanguagesManager/LanguagesManager.php: calls above function, extractLanguageCodeFromBrowserLanguage, expecting a language code, but for “en-ca”, it gets “ca” (Catal) instead of “en”
- Visitors | Locations & providers | Countries data table shows “Unknown” for “en-US”; need to call strtolower(), probably in core/Common.php’s getBrowserlanguage()
The text was updated successfully, but these errors were encountered: