localize-theia

0.2.0 • Public • Published

globale gen

Command to create a folder (i18n) for globalization and store a file to manipulate globalization in theia.

Need to install a package to generate the require data structure. npm install -g localize-theia

Go to the package you want to handle globalization i.e. the editor package as an example cd package/editor localize-theia editor

This previous command will create within the editor package a tree like this . ├── i18n │   └── en.json └── src └── browser └── localize.ts

The file in i18n (en.json) is an example on how to fill your language file In the file you want to localize, add the following: import { localize } from './localize';

And for the string you want to translate to different language: The first argument: string to translate The second argument: default string if the language package is not defined. ex: localize("editor/browser/Code Editor", "Code Editor"); ex: localize("Cut", "Cut");

Readme

Keywords

Package Sidebar

Install

npm i localize-theia

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • lmcbout