xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Go to the documentation of this file.
1 #pragma once
5 #include <filesystem>
6 #include <string>
7 #include <vector>
9 #include "static.h"
10 #include "ustring.h"
13 namespace xtd {
20  class translator final static_ {
21  public:
22  static xtd::ustring language();
23  static void language(const xtd::ustring& language);
25  static std::vector<xtd::ustring> languages();
27  static xtd::ustring system_language();
29  static void add_value(const xtd::ustring& language, const xtd::ustring& key, const xtd::ustring& value);
31  static void parse_locale(const xtd::ustring& locale_path);
33  static void parse_file(const xtd::ustring& file, const xtd::ustring& language);
35  static xtd::ustring translate(const xtd::ustring& value) {return translate(language(), value);}
36  static xtd::ustring translate(const xtd::ustring& language, const xtd::ustring& value);
37  static const char* translate(const char* value) {return translate(language(), value);}
38  static const char* translate(const xtd::ustring& language, const char* value);
40  private:
41  static void initialize();
42  static std::map<xtd::ustring, xtd::collections::specialized::string_map> language_values_;
43  static xtd::ustring language_;
44  };
45 }
Contains xtd::static_object class.
#define static_
This keyword is use to represent a static object. A static object can&#39;t be instantiated (constructors...
Definition: static.h:38
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::collections::specialized::string_map typedef.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::ustring class.
Represents translator class. This class cannot be inherited.
Definition: translator.h:20