Giter Club home page Giter Club logo

ej2-locale's Introduction

ej2-locale

Locale translations for Essential JS 2 components in multiple languages.

Currently supported localization languages

Culture-Code Language
ar-AE Arabic - United Arab Emirates
ar Arabic - Arabia
cs Czech - Czech Republic
da Danish - Denmark
de German - Germany
en-GB English - United Kingdom
en-US English - United States
es Spanish - Spain
fa Farsi - Iran
fi Finnish - Finland
fr French - France
he Hebrew - Israel
hr Croatian - Croatia
hu Hungarian - Hungary
id Indonesian
is Icelandic - Iceland
it Italian - Italy
ja Japanese - Japan
ko Korean - Korea
ms Malay - Malaysia
nb Norwegian (Bokmål) - Norway
nl Dutch - The Netherlands
pl Polish - Poland
pt Portuguese - Portugal
ro Romanian - Romania
ru Russian - Russia
sk Slovak - Slovakia
sv Swedish - Sweden
th Thai - Thailand
tr Turkish - Turkey
vi Vietnamese - Vietnam
zh Chinese - China

How to load locale text for Essential JS 2 components

To load translation object in Essential JS 2 components, you can load locale object in L10.load function from ej.base. For example, In the below code snippet we have loaded the locale file for Arabic culture.

ej.base.setCulture('ar-AE');
var ajax = new ej.base.Ajax('/src/ar-AE.json', 'GET', true);
ajax.onSuccess = function (value) {
        //Assigning locale text value for Essential JS 2 components
        ej.base.L10n.load(value);
    };
ajax.send();

How to load locale globally in typescript

Importing from json files with typescript you first need to enable the resolveJsonModule flag. Either by adding it to your tsconfig.json or directly as argument to the compiler.
It is important to use a plain object! Passing EJ2_LOCALE directly will not work for the L10n.load() method.

import * as EJ2_LOCALE from "../../node_modules/@syncfusion/ej2-locale/src/de.json";
L10n.load({ de: EJ2_LOCALE.de });
setCulture("de");

ej2-locale's People

Contributors

ajithr avatar mydeen-sn avatar sathishkumarrajendran avatar jagufar avatar sridurgha avatar mydeensn avatar kameshrajendran avatar jmfarook7 avatar vairamuthur avatar saranya13 avatar streetrock avatar selva462 avatar vinothyesuraj avatar aishwarya-sf3446 avatar senthamizh-selvan-sf3819 avatar karavinth avatar hemanthkumars1998 avatar syedsulaimans avatar gsumankumar avatar maithiliyk avatar essentialjs2 avatar sasthaprathap avatar aravinth113 avatar re4dev avatar yuvan111 avatar shyamg1991 avatar saranya-dhayalan avatar khaeljy avatar syncsiva avatar satheeskumar-1989 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.