Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Unified Diff: ui/base/l10n/l10n_util.h

Issue 834183005: Move two locale functions from rtl.h into l10n_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/l10n/l10n_util.h
diff --git a/ui/base/l10n/l10n_util.h b/ui/base/l10n/l10n_util.h
index e2cb27d5c9c1efbc77315df8353ecf8c91b3e08d..72f501e52b7c0941f36991009eb3cad66b360143 100644
--- a/ui/base/l10n/l10n_util.h
+++ b/ui/base/l10n/l10n_util.h
@@ -20,8 +20,13 @@
namespace l10n_util {
-// The same as base::i18n::GetCanonicalLocale(const char*), but takes
-// std::string as an argument.
+// Get the locale that the currently running process has been configured to use.
+// The return value is of the form language[-country] (e.g., en-US) where the
+// language is the 2 or 3 letter code from ISO-639.
+UI_BASE_EXPORT std::string GetConfiguredLocale();
+
+// Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name.
+UI_BASE_EXPORT std::string GetCanonicalLocale(const char* locale);
UI_BASE_EXPORT std::string GetCanonicalLocale(const std::string& locale);
// Takes normalized locale as |locale|. Returns language part (before '-').

Powered by Google App Engine
This is Rietveld 408576698