translate.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 
10 namespace ewol {
26  namespace translate {
33  void addPath(const std::string& _lib, const std::string& _path, bool _major = false);
39  const std::string& getPaths(const std::string& _lib);
44  void setLanguageDefault(const std::string& _lang);
49  const std::string& getLanguageDefault();
54  void setLanguage(const std::string& _lang);
59  const std::string& getLanguage();
63  void autoDetectLanguage();
69  std::string get(const std::string& _instance);
70  };
71 };
72 // Here we define a simple macro to Translate all string simply:
73 #define TRANSLATE(a) etranslate::get(a)
const std::string & getLanguageDefault()
Get the current language selected.
void autoDetectLanguage()
Automatic detection of the system language.
const std::string & getLanguage()
Get the current language loaded.
void setLanguage(const std::string &_lang)
Set the language to load data. when no data availlable, we get the default language.
Definition: Area.hpp:16
void addPath(const std::string &_lib, const std::string &_path, bool _major=false)
Set the path folder of the translation files.
void setLanguageDefault(const std::string &_lang)
Set the default language to load data (the default language might contain all internal data for the b...
const std::string & getPaths(const std::string &_lib)
Get the current paths of the library.