language_util.h 666 B

1234567891011121314151617181920212223242526
  1. // Copyright (c) 2020 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef SHELL_COMMON_LANGUAGE_UTIL_H_
  5. #define SHELL_COMMON_LANGUAGE_UTIL_H_
  6. #include <string>
  7. #include <vector>
  8. #include "base/strings/string16.h"
  9. namespace electron {
  10. // Return a list of user preferred languages from OS. The list doesn't include
  11. // overrides from command line arguments.
  12. std::vector<std::string> GetPreferredLanguages();
  13. #if defined(OS_WIN)
  14. bool GetPreferredLanguagesUsingGlobalization(
  15. std::vector<base::string16>* languages);
  16. #endif
  17. } // namespace electron
  18. #endif // SHELL_COMMON_LANGUAGE_UTIL_H_