Skip to content

Joalor64GH/SimpleLocalization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Localization™

My own localization system made from scratch!
Basically, it uses keys from .json files to translate text, and that's all there is to it!

Basic Usage

Initialization:

Localization.init({
    languages: ['en-us', 'es-es', 'fr-fr', 'pt-br', 'yr-hr'],
    directory: "languages", // this variable is optional
    default_language: "en-us" // this variable is optional
});

Switching to another language:

Localization.switchLanguage("en-us");

Retrieving a key:

Localization.get("greeting", "en-us"); // If the second parameter is empty, defaults to current language

Basic .json setup:

{
    "greeting": "Hello world!",
    "farewell": "Goodbye!"
}

Documentation

For futher documentation, check out Localization.hx.

Other Stuff

You can check out this system in action in the samples/flixel folder.
If you need localization tags, go here.

About

My own localization system made from scratch!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages