How do I translate items in the Menu Manager?
The Menu Manager can be a potent tool to help you completely customize your WHMCS navigation menu. One of the many benefits of this feature is the ability to translate your custom menu items. This guide will teach you how to translate your menu items appropriately.
During the Menu Manager’s installation, the module will scan your current menu and pull in default labels for all your menu items. The language used will be the “Default Language” you’ve set in the “Localisation” tab of “General Settings.” As of version 1.2.2 of the Theme Installer, if you change your default language and wish to resync all of your menu items without losing your current customizations, you’re in luck! Click on “Tasks” and select the “Sync Language” option.
Before moving forward, it would be best to read through the WHMCS guide on translating aspects of the platform using the language overrides: https://developers.whmcs.com/languages/overrides/
Translating default WHMCS menu items
The default WHMCS menu items generated via the Menu Manager will already be translated into several languages by WHMCS. Therefore, if you happen to change a default menu items label, you’ll also need to change the translations to match that modification. To do so, you’ll need to access the language file for the language you wish to translate and locate the menu item names. Typically, all menu items will have a variable prefix of “nav,” which should help you.
You will find the language files located in:
Once you’ve located the menu item, copy the variable name into a new language file. Your new language file will then be uploaded to the overrides folder:
Notice: Editing the language files directly is not recommended. When your WHMCS installation is updated, you will lose your customizations.
Translating custom WHMCS menu items
As you know, the Menu Manager will also allow you to create new menu items. These new menu items will need to have their translations added to any additional languages you support. To do this, you’ll need to create or edit the language override file for the language you wish to translate. You will be using the identifier for your custom menu item as the language variable. For example, if your menu item has an identifier of “Social Media,” you will place the following into your language override:
$_LANG['Social Media'] = "Special Translation";
Notice: Try to make your “Identifier” unique so that your language overrides do not impact other language settings.
If you have any issues with translating your menu items, please do not hesitate to open a support ticket.