i18n_util.h 788 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef WEBLAYER_BROWSER_I18N_UTIL_H_
  5. #define WEBLAYER_BROWSER_I18N_UTIL_H_
  6. #include <string>
  7. #include "base/callback_list.h"
  8. namespace weblayer {
  9. namespace i18n {
  10. // Returns the currently-in-use ICU locale. This may be called on any thread.
  11. std::string GetApplicationLocale();
  12. // Returns a list of locales suitable for use in the ACCEPT-LANGUAGE header.
  13. // This may be called on any thread.
  14. std::string GetAcceptLangs();
  15. base::CallbackListSubscription RegisterLocaleChangeCallback(
  16. base::RepeatingClosure locale_changed);
  17. } // namespace i18n
  18. } // namespace weblayer
  19. #endif // WEBLAYER_BROWSER_I18N_UTIL_H_