t(str) {
    if (!this.translations[str]) {
      throw new Error(`${str} Translation string not found`);
    }

    if (!this.translations[str][this.locale]) {
      throw new Error(
        `'${str}' translation not found for locale '${this.locale}'`,
      );
    }

    return this.translations[str][this.locale];
  }
Get translation.

@param {string} str String to translate.
@returns {string} Translated string.