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

Side by Side Diff: base/i18n/rtl.h

Issue 846373002: Move l10n_util's GetCanonicalLocal() function into base/i18n module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromeos 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/i18n/rtl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_I18N_RTL_H_ 5 #ifndef BASE_I18N_RTL_H_
6 #define BASE_I18N_RTL_H_ 6 #define BASE_I18N_RTL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 22 matching lines...) Expand all
33 LEFT_TO_RIGHT = 2, 33 LEFT_TO_RIGHT = 2,
34 TEXT_DIRECTION_NUM_DIRECTIONS = 3, 34 TEXT_DIRECTION_NUM_DIRECTIONS = 3,
35 }; 35 };
36 36
37 // Get the locale that the currently running process has been configured to use. 37 // Get the locale that the currently running process has been configured to use.
38 // The return value is of the form language[-country] (e.g., en-US) where the 38 // The return value is of the form language[-country] (e.g., en-US) where the
39 // language is the 2 or 3 letter code from ISO-639. 39 // language is the 2 or 3 letter code from ISO-639.
40 BASE_I18N_EXPORT std::string GetConfiguredLocale(); 40 BASE_I18N_EXPORT std::string GetConfiguredLocale();
41 41
42 // Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name. 42 // Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name.
43 BASE_I18N_EXPORT std::string GetCanonicalLocale(const char* locale); 43 BASE_I18N_EXPORT std::string GetCanonicalLocale(const std::string& locale);
44 44
45 // Sets the default locale of ICU. 45 // Sets the default locale of ICU.
46 // Once the application locale of Chrome in GetApplicationLocale is determined, 46 // Once the application locale of Chrome in GetApplicationLocale is determined,
47 // the default locale of ICU need to be changed to match the application locale 47 // the default locale of ICU need to be changed to match the application locale
48 // so that ICU functions work correctly in a locale-dependent manner. 48 // so that ICU functions work correctly in a locale-dependent manner.
49 // This is handy in that we don't have to call GetApplicationLocale() 49 // This is handy in that we don't have to call GetApplicationLocale()
50 // everytime we call locale-dependent ICU APIs as long as we make sure 50 // everytime we call locale-dependent ICU APIs as long as we make sure
51 // that this is called before any locale-dependent API is called. 51 // that this is called before any locale-dependent API is called.
52 BASE_I18N_EXPORT void SetICUDefaultLocale(const std::string& locale_string); 52 BASE_I18N_EXPORT void SetICUDefaultLocale(const std::string& locale_string);
53 53
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // return the text itself. Explicit bidi control characters display and have 140 // return the text itself. Explicit bidi control characters display and have
141 // semantic effect. They can be deleted so they might not always appear in a 141 // semantic effect. They can be deleted so they might not always appear in a
142 // pair. 142 // pair.
143 BASE_I18N_EXPORT string16 StripWrappingBidiControlCharacters( 143 BASE_I18N_EXPORT string16 StripWrappingBidiControlCharacters(
144 const string16& text) WARN_UNUSED_RESULT; 144 const string16& text) WARN_UNUSED_RESULT;
145 145
146 } // namespace i18n 146 } // namespace i18n
147 } // namespace base 147 } // namespace base
148 148
149 #endif // BASE_I18N_RTL_H_ 149 #endif // BASE_I18N_RTL_H_
OLDNEW
« no previous file with comments | « no previous file | base/i18n/rtl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698