Beispiel #1
0
  /**
   * Performs initialization of i18n part of TPT. It creates a dictionary, scans and loads all
   * property files from theme-name/i18n folder.
   */
  private synchronized void initializeInternationalizationFramework() {
    if (internationalizationDictionary != null) {
      return;
    }

    internationalizationDictionary = TM.getDictionary(this);
    loadInternationalizationFiles();
  }
Beispiel #2
0
  private void initTranslatoins() {
    Dictionary dict = TM.getDictionary();

    try {
      dict.loadWords(
          "en", "us", TPTLazyLoadingLayout.class.getResource("i18n/en_us.properties"), false);
      dict.loadWords(
          "ru", "ru", TPTLazyLoadingLayout.class.getResource("i18n/ru_ru.properties"), false);
    } catch (IOException io) {
      // no-op
    }
  }