Topics

  1. Home
  2. Docs
  3. Topics
  4. Translations
  5. Language files

Language files

All FooEvents plugins include .po and .mo language files that can be used to translate FooEvents wording. You can use an application such as Poedit to create translations in your own language.

Once the translation files have been generated, they are to be saved as {textdomain}-{locale}.po and {textdomain}-{locale}.mo in the WordPress plugin language folder (e.g wp-content/languages/plugins/) or language folder of the relevant plugin (e.g wp-content/plugins/fooevents/languages). For more information about language and country codes, see Installing WordPress in Your Language.

Sections

Setup Poedit

Download and install the Poedit app – https://poedit.net/download.

fooevents poedit

Create the translation

Open Poedit and select the option to Create a New Translation.

Select the default.po language file located in the relevant FooEvents plugin folder.

When prompted, specify your ISO Language Code. You can find a list of WordPress Locale Codes here – https://wpastra.com/docs/complete-list-wordpress-locale-codes/

Complete the translations as needed using the Poedit interface.

fooevents poedit edit

Export the translation

When ready, select the option to compile to a MO and save the translation.

The files should follow the format below so please make sure that the naming of {locale}.po and {locale}.mo 100% matches the locale your site is using:

Format: {textdomain}-{locale}.po and {textdomain}-{locale}.mo

Example: woocommerce-events-pt-br.po and woocommerce-events-pt-br.mo

Each plugin uses a different text domain and a different translation would need to be provided for each. The textdomains are specified in the main plugin file, here they are for your convenience:

  • FooEvents for WooCommerce – woocommerce-events
  • FooEvents Custom Attendee Fields – fooevents-custom-attendee-fields
  • FooEvents Express Check-ins – fooevents-express-check-in
  • FooEvents Multi-day – fooevents-multiday-events
  • FooEvents PDF Ticket – fooevents-pdf-tickets
  • FooEvents Seating – fooevents-seating
  • FooEvents Calendar – fooevents-calendar

fooevents poedit save

Upload the translation

Place your translated .po and .mo files in the WordPress plugins languages directory i.e. “wp-content/languages/plugins/” OR languages directory of the plugin i.e.”your-website-url/wp-content/plugins/fooevents-plugin-name/languages/”

Lastly ensure that the correct language is selected in your WordPress General settings. To do so, navigate go to you WordPress Admin Area > Settings > General > Site Language.

Tags ,