ZeroZero Game Engine  v0.0
A 3D game engine using Vulkan & Jolt
Static Public Member Functions | Static Public Attributes | List of all members
Locale Class Reference

Detailed Description

Localisation helper

Static Public Member Functions

static void load (const string &file="default")
 
static void setLocale (const string &lang)
 
static const auto & getLocale ()
 
static string getDefaultLocale ()
 

Static Public Attributes

static const string LOCALE_DIRECTORY = "app://locales"
 

Member Function Documentation

static string getDefaultLocale ( )
static

Returns the OS specific user locale

static const auto& getLocale ( )
inlinestatic

Returns the current locale

static void load ( const string &  file = "default")
static

Loads a translation file for the current locale

Parameters
filefile name
static void setLocale ( const string &  lang)
static

Sets the current locale. Can load missing files when switching from another locale.

Parameters
langlangage code

Member Data Documentation

const string LOCALE_DIRECTORY = "app://locales"
inlinestatic

Default directory for translation files