1. Home
  2. Help Center
  3. Common Issues and FAQ's
  4. Translate theme to another language

First, you need to change your language of WP installation. This can be done in Settings → General, where you can set the Site Language option and save the settings.

Translate using Loco Translate

This is the easiest method as you can do it right from your WordPress admin panel. Install the plugin Loco Translate which is free.

Then, go to menu Loco Translate → Themes and click on Goya

Create a new language with the same locale as your language defined in Settings → General. For example, if you main locale is Spanish from Spain es_ES, then your Loco Translate configuration should be exactly the same.

DO NOT select the Author path to save your translations because they will be lost when you update the theme. Use the Custom location preferably.

DO NOT use the Author path

Finally, start translating the strings. For each original string in English add the corresponding translation and save.

If you update the theme you need to click on the Sync button to retrieve any new strings.

Translate using Poedit

For some advanced users this method is faster. You need https://poedit.net/download

Find the languages folder of the theme: wp-content/themes/goya/languages/. There you will find a file goya.pot. Load this file (as the catalog) in the PoEdit and start translating.

Create a New Translation
For example Spanish
and start translating…

When done, save the .po file in the folder wp-content/languages/themes/ and name this file regarding your locale (you can find your locale on this page). For example: for Spanish language you would name your file: goya-es_ES.po. The corresponding .mo file will be automatically created next to the .po file.

And that’s it, your translations should work now.

Additional Elements

Translate Wishlist texts

All Wishlist texts are from YITH Wishlist plugin. Go to menu YITH > Wishlist > Add to Wishlist Options and Wishlist Page Options to translate the strings

Translate filter titles

WC Ajax Product Filters work with widgets. Go to Appearance > Widgets > Shop Sidebar and edit the widget title

Terms & Conditions / Privacy Policy

The Terms & Conditions checkbox caption is included in the WooCommerce translation file. However, there’s a core WooCommerce option in the customizer to change the text easily.

Go to Appearance > Customize > WooCommerce > Checkout to adjust the text.

There is a bug in the latest WordPress 5.6 version and the fields don’t show up. Check here the solution https://github.com/woocommerce/woocommerce/issues/28606

First, select No page set, then select the Terms & Conditions page again to make the extra fields visible.

Wait until the preview has refreshed to select the option as shown in the instructions.

Translate the Description tab title

To translate the Description tab it’s necessary to use a filter.

Based on your Product Details Mode paste one of the following snippets in wp-content/themes/goya-child/functions.php change New Description Title to your desired title.

For the default Tabs Layout:

add_filter( 'woocommerce_product_tabs', 'woo_customize_tabs', 20, 1 ); function woo_customize_tabs( $tabs ) { $tabs['description']['title'] = __( 'New Description Title' ); return $tabs; }
Code language: PHP (php)

For Vertical layout

add_filter( 'woocommerce_product_description_heading', 'custom_description_heading' ); function custom_description_heading( $heading ){ return 'New Description Title'; }
Code language: PHP (php)

For Accordion layout

add_filter( 'woocommerce_product_tabs', 'woo_customize_tabs', 20, 1 ); function woo_customize_tabs( $tabs ) { $tabs['desc_tab']['title'] = __( 'New Description Title' ); return $tabs; }
Code language: PHP (php)

Was this article helpful?

Related Articles