Translate Theme

Every text in Hattrick and its plugins can be translated. The translation templates are:

  • the theme: wp-content/themes/hattrick/languages/hattrick.pot
  • Hattrick Blocks: wp-content/plugins/hattrick-blocks/languages/hattrick-blocks.pot
  • Hattrick Soccer: wp-content/plugins/hattrick-soccer/languages/hattrick-soccer.pot

With the Loco Translate plugin

  1. Install the Loco Translate plugin.
  2. Go to Loco Translate → Themes → Hattrick (or Plugins for Hattrick Blocks and Hattrick Soccer) and add your language. Read more in Loco Translate’s guide.

With the Poedit app

  1. Download and install Poedit.
  2. Open hattrick.pot in Poedit and translate the texts into your language.
  3. Save the translation as a .po file named after your language code, such as hattrick-de_DE.po. Poedit saves the .mo file next to it.

Keeping translations safe from updates

Put your .po and .mo files in wp-content/languages/themes/ for the theme (hattrick-de_DE.mo) and in wp-content/languages/plugins/ for the plugins (hattrick-blocks-de_DE.mo). Updates don’t touch that folder.

Updating a translation

After an update, open your .po file in Poedit and choose Translation → Update from POT File, then translate the new texts.

Was this page helpful?