forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
translation_manager.cpp
60 lines (48 loc) · 1.48 KB
/
translation_manager.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#if defined(LOCALIZE)
#include "translation_manager_impl.h"
TranslationManager &TranslationManager::GetInstance()
{
static TranslationManager singleton;
return singleton;
}
std::unordered_set<std::string> TranslationManager::GetAvailableLanguages()
{
return impl->GetAvailableLanguages();
}
void TranslationManager::SetLanguage( const std::string &language_code )
{
impl->SetLanguage( language_code );
}
std::string TranslationManager::GetCurrentLanguage() const
{
return impl->GetCurrentLanguage();
}
void TranslationManager::LoadDocuments( const std::vector<std::string> &files )
{
impl->LoadDocuments( files );
}
const char *TranslationManager::Translate( const std::string &message ) const
{
return impl->Translate( message );
}
const char *TranslationManager::Translate( const char *message ) const
{
return impl->Translate( message );
}
const char *TranslationManager::TranslatePlural( const char *singular, const char *plural,
std::size_t n ) const
{
return impl->TranslatePlural( singular, plural, n );
}
const char *TranslationManager::TranslateWithContext( const char *context,
const char *message ) const
{
return impl->TranslateWithContext( context, message );
}
const char *TranslationManager::TranslatePluralWithContext( const char *context,
const char *singular,
const char *plural, std::size_t n ) const
{
return impl->TranslatePluralWithContext( context, singular, plural, n );
}
#endif // defined(LOCALIZE)