summaryrefslogtreecommitdiffstats
path: root/app/resource_bundle_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'app/resource_bundle_posix.cc')
-rw-r--r--app/resource_bundle_posix.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/resource_bundle_posix.cc b/app/resource_bundle_posix.cc
index ec6893a..044bc3d 100644
--- a/app/resource_bundle_posix.cc
+++ b/app/resource_bundle_posix.cc
@@ -5,6 +5,7 @@
#include "app/resource_bundle.h"
#include "app/gfx/font.h"
+#include "app/l10n_util.h"
#include "base/data_pack.h"
#include "base/logging.h"
#include "base/string16.h"
@@ -79,7 +80,7 @@ string16 ResourceBundle::GetLocalizedString(int message_id) {
return msg;
}
-void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
+std::string ResourceBundle::LoadResources(const std::wstring& pref_locale) {
DCHECK(!resources_data_) << "chrome.pak already loaded";
FilePath resources_file_path = GetResourcesFilePath();
DCHECK(!resources_file_path.empty()) << "chrome.pak not found";
@@ -87,12 +88,14 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
DCHECK(resources_data_) << "failed to load chrome.pak";
DCHECK(!locale_resources_data_) << "locale.pak already loaded";
- FilePath locale_file_path = GetLocaleFilePath(pref_locale);
+ std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
+ FilePath locale_file_path = GetLocaleFilePath(app_locale);
if (locale_file_path.empty()) {
// It's possible that there is no locale.pak.
NOTREACHED();
- return;
+ return std::string();
}
locale_resources_data_ = LoadResourcesDataPak(locale_file_path);
DCHECK(locale_resources_data_) << "failed to load locale.pak";
+ return app_locale;
}