Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
JSInterface_L10n.cpp File Reference
#include "precompiled.h"
#include "JSInterface_L10n.h"
#include "i18n/L10n.h"
#include "lib/utf8.h"
#include "ps/CLogger.h"
#include "scriptinterface/FunctionWrapper.h"
#include "scriptinterface/ScriptRequest.h"
Include dependency graph for JSInterface_L10n.cpp:

Namespaces

namespace  JSI_L10n
 Namespace for the functions of the JavaScript interface for internationalization and localization.
 

Macros

#define REGISTER_L10N(name)    ScriptFunction::Register<&L10n::name, &L10nGetter>(rq, #name);
 
#define REGISTER_L10N_FUNC(func, name)    ScriptFunction::Register<func, &L10nGetter>(rq, name);
 

Functions

L10nJSI_L10n::L10nGetter (const ScriptRequest &, JS::CallArgs &)
 
std::vector< std::string > JSI_L10n::TranslateArray (const std::vector< std::string > &sourceArray)
 
std::string JSI_L10n::FormatMillisecondsIntoDateStringLocal (UDate milliseconds, const std::string &formatString)
 
std::string JSI_L10n::FormatMillisecondsIntoDateStringGMT (UDate milliseconds, const std::string &formatString)
 
void JSI_L10n::RegisterScriptFunctions (const ScriptRequest &rq)
 Registers the functions of the JavaScript interface for internationalization and localization into the specified JavaScript context. More...
 

Macro Definition Documentation

◆ REGISTER_L10N

#define REGISTER_L10N (   name)     ScriptFunction::Register<&L10n::name, &L10nGetter>(rq, #name);

◆ REGISTER_L10N_FUNC

#define REGISTER_L10N_FUNC (   func,
  name 
)     ScriptFunction::Register<func, &L10nGetter>(rq, name);