In this tutorial we'll cover how to edit the language text that isn't editable via Wizard Panel.
How/where 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/).
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:
$_LANG['menu_portal'] = “Portal”;
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:
$_LANG['menu_portal'] = “Support”;
You can see the difference before and after the edit below:
Depending on your template you will find various options under WHMCS admin > addons > Wizard Panel > multi-language support:
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.
On (Native 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:
Off (Single language)
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.
How to remove languages
If you want to support some but not all languages you'll need to make 2 edits:
- Remove un-used language files from: WHMCS_path/lang/
- Remove or comment out each unused language (1 language per line) in: templates/your_template/includes/languages.tpl
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 30 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.