Streamit
Streamit Documentation

Loco Translate

What is Loco Translate?

Loco Translate is a WordPress plugin that enables you to edit PO (Portable Object) translation files directly in your browser. It lets you create and update language files for themes and plugins, integrating with automatic translation services (like DeepL, Google, Microsoft, or Lecto AI) if desired. Its in-dashboard editor replaces the need to use external tools like Poedit, offering a more convenient solution for translating static (non-dynamic) content such as user interface strings.

Below is a simple, non-developer step‐by‐step guide for using your existing .pot files with Loco Translate to translate your theme or plugin texts:

You can Download it from here: (https://wordpress.org/plugins/loco-translate/).

Step 1: Install and Activate Loco Translate

  • Go to your WordPress Dashboard:
    Navigate to Plugins > Add New.
  • Search for “Loco Translate”:
    Click Install Now and then Activate.

Once activated, a new menu item called “Loco Translate” appears on your left-hand sidebar.

Step 2: Access Your Theme or Plugin Translations

Since your theme and plugins already have a .pot file (the template for translations), you can create your own translation files:

  • For Themes:
    • In the WordPress admin sidebar, click Loco Translate > Themes.
    • Find and click on the theme you want to translate.
  • For Plugins:
    • Click Loco Translate > Plugins.
    • Select the plugin you wish to translate.

Step 3: Add a New Language Translation

  • Click “New language”:
    When you open your theme or plugin in Loco Translate, you’ll see a button labeled New language.
  • Select Your Desired Language:
    Choose the language you want to translate into from the dropdown list (for example, Spanish, French, etc.).
  • Choose a Storage Location:
    For safety (to avoid losing your translations during updates), select the option labeled “Custom”. This will store your translations in a safe folder (for example, in wp-content/languages/loco/themes/your-theme-{locale}.po).
  • Click “Start Translating”:
    This action will create a new translation file (a .po file) from your .pot file and open the translation editor.

Step 4: Translate the Strings

  • See the List of Strings:
    You’ll see all the texts (strings) from your theme or plugin that can be translated.
  • Select a String to Translate:
    Click on any string in the list. The original text (usually in English) appears on the left.
  • Enter Your Translation:
    In the box on the right, type in your translation.
  • Use the Search Box:
    If you are looking for a specific piece of text, use the search field to find it quickly.

Step 5: Save Your Work

  • Click “Save”:
    After you’ve added your translation, click the Save button in the toolbar (or use the keyboard shortcut if available).
  • Automatic File Generation:
    Loco Translate will automatically generate the corresponding .mo file (the file WordPress uses to show the translations).

Step 6: Verify Your Translations

  • Switch Your Site Language (if needed):
    To see your translations in action, go to Settings > General in your WordPress Dashboard and change the Site Language to the language you just translated.
  • Check Your Site’s Front End:
    Visit your site pages to ensure the translated texts are now showing as expected.

This process uses your existing .pot file as the source for all translatable texts and creates a new language file that holds your translations. With these steps, you can update all texts to your desired language without any need for coding. Enjoy your newly translated site!