1. Home
  2. Docs
  3. Listar App
  4. WordPress Theme
  5. Translation

Translation

Internationalization is the process of preparing your theme so it can be easily translated into different languages. This involves structuring your code to support localization, without hardcoding text.

The term is often abbreviated as i18n, short for “internationalization” (there are 18 letters between the first i and the last n).

Dashboard → Settings → General → Site Language

Language Settings

What is a .pot File

A .pot (Portable Object Template) file contains all the translatable strings from your theme. It’s the blueprint for translating your theme into other languages.

When your theme is internationalized correctly (i18n), all static text (like “Read More”, “Related Posts”, etc.) is wrapped in translation functions like __() or _e().

The .pot file is then generated from those strings and used to create specific language files:

  • .po – Portable Object (the actual translated text)
  • .mo – Machine Object (compiled version used by WordPress)

Where to Find the .pot File?

./wp-content/themes/listar-wp/languages/en.pot

How to Use the .pot File for Translation?

You can translate the .pot file using tools like:

  • Loco Translate (inside WordPress)
  • Poedit (desktop app)
  • WPML or Polylang (translation plugins)

When you save translations, the tool will generate

your-theme-fr_FR.po
your-theme-fr_FR.mo

And WordPress will automatically load the correct language file based on the site’s language setting.

Sample translation with Poedit

  1. Open Poedit on your computer.
  2. Click “File → Open” and select the .pot file (or an existing .po file) from your theme’s /languages/ folder.
  3. Choose your target language (e.g., French, Spanish) if prompted.
  4. Begin translating each string in the interface — type your translation in the bottom field.
  5. When done, click File → Save As and Poedit will generate both:
    • A .po file (editable text)
    • A .mo file (used by WordPress)

Save the file with the correct locale name. Ex:

./wp-content/themes/listar-wp/languages/pt_BR.po.

Create a new translation from PO Template
Select file en.pot
Select the Language of the translation
Save the translated file as the country code