Skip to content

Commit 65324b8

Browse files
author
win32ss
committed
(#1695) Another new fallback for locales.
1 parent 25898ab commit 65324b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/base/resource/resource_bundle.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@ std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale,
507507
if (hypen != std::string::npos) {
508508
locale_file_path = GetLocaleFilePath(app_locale.substr(0, hypen));
509509
result = data_pack->LoadFromPathWithError(locale_file_path);
510+
if (!result.has_value()) {
511+
locale_file_path = GetLocaleFilePath("en-GB");
512+
result = data_pack->LoadFromPathWithError(locale_file_path);
513+
}
510514
}
511515
if (!result.has_value() && crash_on_failure) {
512516
DataPack::ErrorState& error = result.error();

0 commit comments

Comments
 (0)