0.32.2 • Published 4 months ago

@grandlinex/bundle-multilang v0.32.2

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
4 months ago

GrandLineX Multilang Bundle

Multilang support for GrandLineX

Description

GrandLineX is an out-of-the-box server framework.

GitHub NPM TS

Status

Quality Gate Status Security Rating Maintainability Rating Reliability Rating Coverage

Issues

Bugs Vulnerabilities Code Smells

Store Variables

KeyDescription
GLX_TRANSLATION_PATHPath to translation *.json files

Install

Example

class TestKernel extends CoreKernel<any> {
  constructor(appName:string, appCode:string) {
    super( { appName, appCode});
    
    // ...

    /** 
     * optional set the root path for translations
     * -> alternatively you can pass the path in  .env file GLX_TRANSLATION_PATH=$PATH
     */
    const pathToTranslation=""; //  Set path to folder containing translation files
    const store = this.getConfigStore();
    store.set(LangClient.STORE_TRANSLATION_PATH,pathToTranslation)

    
    const defaultLangKey="en"; // Set the default lang key
    this.addModule(new LangModule(this,defaultLangKey));
    
  }
}

Translation format

File naming $key-$name.json like en-English.json or de-German.json

{
  "test.key.first": "helloWorldEn",
  "test.key.second": "helloWorld2En"
}

Documentation

0.32.2

4 months ago

0.32.1

4 months ago

0.32.0

9 months ago

0.31.0

10 months ago

0.30.2

1 year ago

0.30.1

1 year ago

0.30.0

1 year ago

0.28.0

1 year ago

0.27.1

1 year ago

0.27.0

1 year ago

0.26.0

1 year ago

0.25.1

2 years ago

0.25.0

2 years ago

0.24.0

2 years ago

0.23.1

2 years ago

0.23.0

2 years ago

0.22.0

2 years ago

0.19.0

2 years ago

0.17.2

2 years ago

0.21.0

2 years ago

0.20.0

2 years ago

0.17.0

2 years ago

0.18.0

2 years ago

0.17.1

2 years ago

0.16.1

2 years ago

0.16.0

2 years ago