Smart Coupons provide a powerful, “all-in-one” solution for gift cards, store credits, discount coupons, and vouchers extending the core functionality of WooCommerce coupons.
This doc article explains how you can translate texts of the Smart Coupons plugin.
It is possible to translate Smart Coupons texts in your language. There are various methods to translate a plugin. If those methods are not working, you can try following steps, as these steps are tested:
- Check
wp-config.php
file, whetherWP_LANG_DIR
is already defined. If not, add the following line in yourwp-config.php
file:define ('WP_LANG_DIR','/home/{user}/public_html/{wordpress_directory}/wp-content/languages');
- Now go to this path:
/home/{user}/public_html/{wordpress_directory}/wp-content/languages
- Create a new directory & name it as woocommerce-smart-coupons
- Install & activate a free WordPress plugin: Loco Translate.
- Navigate to Loco Translate > Manage translations from the sidebar admin menu
- Under Plugins, locate ‘WooCommerce Smart Coupons’.
- Check if a language file for your language already exists. If it exists, click to edit, If not, click New language to add the translation for your language
- Select your language from the dropdown menu & click Start translating.
- You’ll see 2 columns: left containing texts from the plugin. Select one of them & add translated text for this from below. Repeat the steps for other texts also.
- Once done, save it using the Save button. If sufficient permissions for saving are not there, download the PO & MO file.
- Upload these files to:
/home/{user}/public_html/{wordpress_directory}/wp-content/languages/woocommerce-smart-coupons
- Make sure these files have proper read permission otherwise, texts will not be translated.
- You can also place these PO & MO files inside the languages directory of the plugin, but it is not recommended, as you’ll lose it when you’ll update the plugin.
Now Smart Coupons should display your texts.