650d329f0e329b9b6641d4faa50a4a7eae1844f6
[platform/framework/web/crosswalk-tizen.git] / src / common / locale_manager.h
1 // Copyright 2015 Samsung Electronics Co, Ltd. 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
5 #ifndef WRT_COMMON_LOCALE_MANAGER_H_
6 #define WRT_COMMON_LOCALE_MANAGER_H_
7
8 #include <string>
9 #include <list>
10 #include <map>
11
12 namespace wrt {
13
14 class LocaleManager {
15  public:
16   typedef std::map<std::string, std::string> StringMap;
17
18   LocaleManager();
19   virtual ~LocaleManager();
20   void SetDefaultLocale(const std::string& locale);
21   void EnableAutoUpdate(bool enable);
22   void UpdateSystemLocale();
23   const std::list<std::string>& system_locales() const
24     { return system_locales_; }
25
26   std::string GetLocalizedString(const StringMap& strmap);
27
28  private:
29   std::string default_locale_;
30   std::list<std::string> system_locales_;
31 };
32
33 }  // namespace wrt
34
35 #endif  // WRT_COMMON_LOCALE_MANAGER_H_