How to write language override for plugin in multilingual site
Last updated
Last updated
Sometimes you need to translate some text (which is rendered from any apps or plugins) for your multilingual site. This guide will help you to translate them. Please keep following the instructions given below.
First thing, you have to find the language string for the text that you want to translate.
For example, if you are using the Sagepay payment plugin on your site and want to translate the error message, please open the downloaded plugin file.
Open the language folder and edit the INI file.
Find the language constant for the text that you want to translate.
Once find the language constant, go to Extensions > Language > Overrides
Before creating the override, set the Filter to ADMINISTRATOR (of the language that you wanted to create the override. Say, your language is French. Then you should select the German (fr-FR) Administrator in the filter)
Click NEW button.
Check both locations and save.
NOTE: For translating the plugin’s text in a multilingual site, please don’t put the language strings directly into your site’s language file. Please create a language override for the specific language.
Enter your language constant in the language constant text box and enter the value in the Text box.