mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add server side translations capability (#9733)
* Add server side translations capability
This commit is contained in:
parent
914dbeaa0b
commit
cee3c5e73d
14 changed files with 126 additions and 18 deletions
|
@ -20,9 +20,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "translation.h"
|
||||
#include "log.h"
|
||||
#include "util/string.h"
|
||||
#include <unordered_map>
|
||||
|
||||
static Translations main_translations;
|
||||
Translations *g_translations = &main_translations;
|
||||
|
||||
#ifndef SERVER
|
||||
// Client translations
|
||||
Translations client_translations;
|
||||
Translations *g_client_translations = &client_translations;
|
||||
#endif
|
||||
|
||||
// Per language server translations
|
||||
std::unordered_map<std::string,Translations> server_translations;
|
||||
std::unordered_map<std::string,Translations> *g_server_translations = &server_translations;
|
||||
|
||||
Translations::~Translations()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue