How to translate

Documentation Search

  1. Home
  2. Addons
  3. Document Gallery
  4. How to translate

How to translate

Here’s a guide to translating the CatFolders Document Gallery plugin’s UI text:

1. Preparation

You should choose one of these translation tools: Either WP-CLI or Loco Translate plugin.

2. Generating translation files

Using WP-CLI:

  1. Open a terminal and navigate to the plugin’s directory: catfolders-document-gallerylanguages.
  2. Run wp i18n make-pot . to create a POT file (template for translations).
  3. For each language, run wp i18n make-json <language_code> . (e.g., wp i18n make-json fr_FR . for French).
  4. Place JSON files in catfolders-document-gallery/languages/<language_code>/.

Using Loco Translate:

  1. Install and activate the Loco Translate plugin.
  2. Go to “Loco Translate” in your WordPress admin panel.
  3. Select the plugin and click “New language”.
  4. Choose a language and Loco Translate will automatically create the JSON file.

Note: Please be sure to select the file location as shown in the screenshot below.

translate document gallery with logo translate

3. Translating text

  1. Open the generated JSON file in a text editor or Loco Translate’s interface.
  2. Translate each text string, ensuring accuracy and cultural relevance.
  3. Save the translated JSON file.

4. Loading translations

  • WP-CLI: Translations are automatically loaded if files are in the correct directory, which is catfolders-document-gallerylanguages.
  • Loco Translate: Translations are automatically loaded by the plugin.

Becoming a Translation Contributor (optional)

If you want to contribute to our public repository, you can publish your translations by visiting https://translate.wordpress.org/projects/wp-plugins/catfolders-document-gallery/ and add the translations of your locale(s).

Then, we will post a PTE request on https://make.wordpress.org/polyglots/ to get you approved as a translation editor on WordPress.org.

Approved translators can create language-specific files and submit them back to us for inclusion in the plugin.

Was this article helpful to you? No Yes

How can we help?