Used for the localization of strings.

Hierarchy

  • Translator

Methods

T

  • T(str: string): string
  • The method returns the translation of a string based on the user’s locale.

    Parameters

    • str: string

      String for translation.

      // The user’s locale: 'en-US', 'es- ES', etc. 
      const res = SR.T('hello'); // return 'hola' 
      

    Returns string

    Translation of the string.