Used for the localization of strings.
The method returns the string translation based on the provided locale.
// Get company's locale const lang = await System.company. getLanguage(); const locale = lang.code; // Translate string const res = SR.T('hello', locale);
Translation of the string.
Your review is successfully sent!
Feedback sent successfully
Object to work with translations
Used for the localization of strings.
Hierarchy
Methods
T
The method returns the string translation based on the provided locale.
// Get company's locale const lang = await System.company. getLanguage(); const locale = lang.code; // Translate string const res = SR.T('hello', locale);Parameters
str: string
Returns string
Translation of the string.
The method returns the string translation based on the provided locale.
// Get company's locale const lang = await System.company. getLanguage(); const locale = lang.code; // Translate string const res = SR.T('hello', locale);Parameters
str: string
locale: string
Returns Promise<string>
Translation of the string.