Search results

L10n

L10n modules provides localized text for different culture.

import {setCulture} from '@syncfusion/ts-base-library';
//load global locale object common for all components.
L10n.load({
   'fr-BE': {
      'button': {
           'check': 'vérifié'
       }
   }
});
//set globale default locale culture.
setCulture('fr-BE');
let instance: L10n = new L10n('button', {
   check: 'checked'
});
//Get locale text for current property.
instance.getConstant('check');
//Change locale culture in a component.
instance.setLocale('en-US');

Methods

getConstant

Returns current locale text for the property based on the culture name and control name.

Returns string

setLocale

Sets the locale text

Returns void

load

Sets the global locale for all components.

Parameter Type Description
localeObject Object specifies the localeObject to be set as global locale.

Returns void