Allows The App To Show Different Languages.
More...
#include <Language.h>
|
| | HK_Language () |
| |
| | HK_Language (std::string Path) |
| | Constructor Opens the xml language file and reads it into two arrays. More...
|
| |
| int | Count () |
| | Returns The Number Of Strings Stored In The Arrays. More...
|
| |
| void | Clear () |
| |
| int | Errors () |
| | Returns Error Code. More...
|
| |
| std::string | GetLanguage () |
| | Returns What The Translated Language Is. More...
|
| |
| std::string | GetPath () |
| | Returns The Path For The Language File. More...
|
| |
| void | SetPath (std::string Path) |
| | Sets/Loads Path Opens the xml language file and reads it into two arrays. More...
|
| |
| std::string | Translate (std::string Text) |
| | The Actual Translate Function This function checks Text against the base languages strings, if found it returns the translated value. If not found it returns the same string. More...
|
| |
|
| void | Add (std::string Base, std::string Translate) |
| | Adds Values To The Arrays This function is used internally only. More...
|
| |
Allows The App To Show Different Languages.
- Since
- 09/19/2021
Definition at line 23 of file Language.h.
◆ HK_Language() [1/2]
| HK_Language::HK_Language |
( |
| ) |
|
◆ HK_Language() [2/2]
| HK_Language::HK_Language |
( |
std::string |
Path | ) |
|
Constructor Opens the xml language file and reads it into two arrays.
- Parameters
-
| Path | The Path To The Language File |
Definition at line 18 of file HK_Language.cpp.
◆ Add()
| void HK_Language::Add |
( |
std::string |
Base, |
|
|
std::string |
Translate |
|
) |
| |
|
private |
Adds Values To The Arrays This function is used internally only.
- Parameters
-
| Base | The String In The Base Language |
| Translate | The String Translated To Another Language |
Definition at line 63 of file HK_Language.cpp.
◆ Clear()
| void HK_Language::Clear |
( |
| ) |
|
◆ Count()
| int HK_Language::Count |
( |
| ) |
|
Returns The Number Of Strings Stored In The Arrays.
Definition at line 69 of file HK_Language.cpp.
◆ Errors()
| int HK_Language::Errors |
( |
| ) |
|
◆ GetLanguage()
| std::string HK_Language::GetLanguage |
( |
| ) |
|
Returns What The Translated Language Is.
Definition at line 73 of file HK_Language.cpp.
◆ GetPath()
| std::string HK_Language::GetPath |
( |
| ) |
|
Returns The Path For The Language File.
Definition at line 75 of file HK_Language.cpp.
◆ SetPath()
| void HK_Language::SetPath |
( |
std::string |
Path | ) |
|
Sets/Loads Path Opens the xml language file and reads it into two arrays.
- Parameters
-
| Path | The Path To The Language File |
Definition at line 25 of file HK_Language.cpp.
◆ Translate()
| std::string HK_Language::Translate |
( |
std::string |
Text | ) |
|
The Actual Translate Function This function checks Text against the base languages strings, if found it returns the translated value. If not found it returns the same string.
- Parameters
-
| Text | The Text To Be Translated |
Definition at line 83 of file HK_Language.cpp.
◆ BaseLang
| std::vector<std::string> HK_Language::BaseLang |
|
private |
◆ doc
| tinyxml2::XMLDocument HK_Language::doc |
|
private |
◆ Error
| int HK_Language::Error = 0 |
|
private |
◆ LangPath
| std::string HK_Language::LangPath |
|
private |
◆ Language
| std::string HK_Language::Language = "English" |
|
private |
◆ Translated
| std::vector<std::string> HK_Language::Translated |
|
private |
The documentation for this class was generated from the following files: