Latest version:
Tramway SDK 0.0.9
Github
Quick links
Home
Get Started

Language


The language system allows for localization of text.

UTF-16 support is planned, but currently the only supported text encoding is Latin 7/Windows 1257. It supports these languages:

  • Estonian
  • Latvian
  • Lithuanian
  • Finnish
  • English
  • German
  • Polish
  • Slovene
  • Norwegian
  • Swedish
  • Danish

File format


Curently the format has no header. It consists of lines, they start with the name of the string, a space and then the rest of the line is the string.

Example.

mongus-ask Hello! Where is Mongus?
mongus-answer Very busy. Come back later!

The language files are stored in the /data/ directory, the file extension is .lang.

Programming in C++


#include <framework/language.h>
API documentation page.

// loading a language file
Language::Load("english");

// accessing a string
printf("%s\n", Language::Get("hello"));