Chromium Code Reviews| Index: app/l10n_util.h |
| =================================================================== |
| --- app/l10n_util.h (revision 68844) |
| +++ app/l10n_util.h (working copy) |
| @@ -56,6 +56,23 @@ |
| const std::string& display_locale, |
| bool is_for_ui); |
| +// Converts all - into _, to be consistent with ICU and file system names. |
| +std::string NormalizeLocale(const std::string& locale); |
| + |
| +// Produce a vector of parent locales for given locale. |
| +// It includes the current locale in the result. |
| +// sr_Cyrl_RS generates sr_Cyrl_RS, sr_Cyrl and sr. |
| +void GetParentLocales(const std::string& current_locale, |
| + std::vector<std::string>* parent_locales); |
| + |
| +// Checks if a string is plausibly a syntactically-valid locale string, |
| +// for cases where we want the valid input to be a locale string such as |
| +// 'en', 'pt-BR', 'fil', and 'zh-Hans-CN', but we don't want to limit it |
|
jungshik at Google
2010/12/10 22:21:28
examples like 'es-419' and 'de_DE@collation=phoneb
|
| +// to locales that Chrome actually knows about, so 'xx-YY' should be |
| +// accepted, but 'z', 'German', 'en-$1', or 'abcd-1234' should not. |
| +// Case-insensitive. Based on BCP 47. |
| +bool IsValidLocaleSyntax(const std::string& locale); |
| + |
| // |
| // Mac Note: See l10n_util_mac.h for some NSString versions and other support. |
| // |