Vendor To Seller

Translation Method to change string without doing any code

Language is an interesting part of human life. Someone love to call his Mother like Mom or another one loves to call “Mummy or Ma”. Similarly when you are running a website with lots of English words which was written by the plugin/theme author which can be different or you might not like that wording.

Let me give you an example- When the user is not selecting any address on the checkout it shows this message- No shipping method has been selected. Please double check your address, or contact us if you need any help.

Now, the website owner needs to change this text and he is not a developer or he does not want to modify any code inside the plugin. Now the question is how it can be done?

How to change a string without modifying code in the Same Language?

Your website default language is English. Now, you need to change the above sentences from WooCommerce plugin without modifying the code. How you can do it?

Yes, you can apply my own titled “Translation method” ๐Ÿ˜€

By following my method you can keep your site language in your Default Langauge but the string which you need to change would be changed.

Applying the Translation Method

When you translate any WordPress plugin that time you just need to translate the plugin POT file and you need to insert the .po and .mo file. You can get help from this post.

Now, our problem is we need to keep the website in English, not to any other language.

When WordPress translate a plugin that time it reads the translated file name and then it replaces the translations file of the plugin with the file which is similar to the selected Langauge Code. Like if you set the website Langauge to Bengali then the language code is “bn_BD”. WordPress will check if the plugin has the translated file in bn_BD inside the language folder of the plugin. If the system gets the file then it will show all the strings inside the Translated file.

By using this method of WordPress, we will change a String and keep the website in English.

Our Target to change ” No shipping method has been selected. Please double check your address, or contact us if you need any help.” from WooCommerce and replace with “Hello! this is Nazmul Hassan”.

1st Step -> Install POEDIT on your local PC

2nd Step -> Open the woocommerce.pot file via your POT file-

Opening POT file of WooCommerce

Step-3 -> Now, find the string you want to translate and insert your translation like below-

Translating the string

Step-4 -> After translating just save the file as & woocommerce-en_GB.po inside the wp-content/plugins/woocommerce/i18n/languages folder or you can insert it on wp-content/languages/plugins folder.

Now, when I have renamed the translation file to en_GB that means I need to set my WordPress language to English (United Kingdom) version. No need to worry, your all the strings will be same as before because you did not translate or change anything inside the .po/.mo file rather than a single string.

WordPress will read the file name and it will fetch all the strings from your file ๐Ÿ™‚

How it looks now?

Before applying the translation method it was like this-

Before Translating

After applying the translation method-

Applied Translation method

Change “Vendor” to “Seller” in Dokan

Share This Post

Related Post

0 thoughts on “Translation Method to change string without doing any code

    1. You have to follow the same method. Translate dokan-lite and paid version and then insert the language file as I mentioned on this blog.

  1. Hi

    Thank you for this post its helped massively!

    Has anyone had an issue where certain phrases aren’t being translated?

    This works great for some bits but not at all on others…

    For example;

    ‘Vendor Biography’ doesn’t change, neither does ‘Vendors’


      1. Thank you for replying, much appreciated

        I have translated Dokan-lite however Dokan-pro I get the a message saying that the file is not completely configured. Do you have any idea on this point?

        Additional files found
        This bundle isn’t fully configured, so we don’t know what the following files are for. Click the setup tab to complete the bundle configuration.

        Many thanks!

        1. Are you using Loco-translate? Then make sure that the file name is correct – dokan-bn_BD.po (replace with your own country+ language code).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: