In this tutorial we'll cover how to edit the language text that isn't editable via Wizard Panel.
How to edit the language text
The file you need to edit for text in the template will be depend on your default language set in WHMCS under setup > general settings > localization. If for example your default language is English you will be able to edit the text in the english.php file below:
In this file you'll find all of the text used in the template that supports multi languages. Depending on your template some other text may be added directly to the .tpl files (found at public_html/templates/YOUR_TEMPLATE/).
A screenshot showing the WHMCS template language text.
The text located in the template is loaded from this file in order to support multiple languages in the same way the default WHMCS text is. For example, the following line sets the name of the portal.php link on the menu:
Let's say you want to change the name of this link to Support. You'd simply change the text to the right between the 2 quotes as so:
You can see the difference before and after the edit below:
Portal link before the edit
Portal link after the edit
Depending on your template you will find various options under WHMCS admin > addons > Wizard Panel > multi-language support:
Multi-language support: Google Translate
If you want to support multi-languages we recommend using Google Translate. Once enabled a Google translate button will be displayed at the top of your website, this will allow your visitors to instantly change the language of your website. Google will automatically translate the default text of your template to the supported language. This means you can have a multi-language website while only editing the default language text.
Multi-language support: on
Note: We don't provide language translations which is why all languages use English text by default (Why?)
WHMCS multi-language support
With multi-language support set to on the template will use native WHMCS language support. This requires you to translate the text for the languages you'd like to support (why don't you provide translations?).
Your default text will be editable in via your default language file. So if your default language is English you will find the text in:
You will need to translate the text for each language you'd like to support in the specific language file. For example if you also want to support French you'd need to translate the text in the following file:
If you want to support some but not all languages you'll need to make 2 edits:
- 1. Remove un-used language files from: WHMCS_path/lang/
- 2. Remove or comment out each unused language (1 language per line) in: templates/your_template/includes/languages.tpl
Multi-language support: off
When multi-language is set to off text in your template will be edited between Wizard Panel and the language file for your default language.
Why don't you provide translations with the template?
Since we first added multi-language support to our templates we decided not to provide translations as this would take considerable amount of time to setup and maintain for over 20 WHMCS languages. This would result in less time developing the templates and implementing new features which would be a bad use of our available time and resources.
Leave a comment
Let us know what you think!