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
- Install the Loco Translate plugin.
- 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
- Download and install Poedit.
- Open
hattrick.potin Poedit and translate the texts into your language. - 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.