des.util.localization

Simple Usage:

0. run program

0. copy and rename "translate/dir/base" to "translate/dir/lang.lt", where <lang> is language to translate

0. in each line in "translate/dir/lang.lt" write translation of line, for example hello : привет

0. profit

Members

Classes

BaseLocalization
class BaseLocalization
DictionaryLoaderException
class DictionaryLoaderException
DirDictionaryLoader
class DirDictionaryLoader

load localizations from directory

Translator
class Translator

singleton class for localization

Functions

setTranslatePath
void setTranslatePath(string dir)
Undocumented in source. Be warned that the author may not have intended to support it.

Interfaces

DictionaryLoader
interface DictionaryLoader

localization handler

Localization
interface Localization
WordConverter
interface WordConverter

convert key to word

Properties

_
string _ [@property setter]

main function for localization when debug(printlocalizationkeys) output keys from pragma

Examples

setTranslatePath( "<translate/dir>" ); writeln( _!"hello" ); Translator.setLocalization( "ru" ); writeln( _!"hello" ); writeln( _!"world" );

Meta