blob: d5dba5bc53b16835b2461a28af11055cd6f53243 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <std/string.hpp>
#include <std/unordered_map.hpp>
namespace platform
{
/// GetTextById represents text messages which are saved in textsDir
/// in a specified locale.
class GetTextById
{
public:
GetTextById(string const & textsDir, string const & localeName);
bool IsValid() const { return !m_localeTexts.empty(); }
string operator()(string const & textId) const;
private:
unordered_map<string, string> m_localeTexts;
};
} // namespace platform
|