/ /website-builder/ /extensions/ /module-integration/ /order-form/

# Languages

The Lagom WHMCS Website Builder supports multiple languages, allowing your website to serve a diverse range of customers. This section explains how to manage and customize language settings to meet your needs.

Lagom WHMCS Website Builder partially uses its own translation strings. Where possible, we have applied strings provided by the WHMCS system (opens new window) and by our Lagom WHMCS Client Theme but there are places where we had to create custom strings.

# Translations

For effective translation management within the Lagom WHMCS Website Builder, it is recommended to use language overrides. This ensures that your custom translations are not overwritten by future updates, maintaining the integrity of your personalized language settings.

# Overrides

"Overrides" have been implemented to let you override the existing Lagom WHMCS Website Builder translations or to create new translation strings that then can be used in the Lagom WHMCS Website Builder. Here, you will find detailed instructions on how to access the override directory, create override files, and define custom language strings that will be exclusive to your installation.

  1. Log in to FTP/SFTP of your WHMCS server.
  2. Go to /templates/lagom2/core/lang/cms and create the overrides folder. All files created in the overrides folder will not be overwritten by future Lagom updates.
  3. Open the newly created file in your preferred editor.
  4. Start the file with a PHP tag <?php indicating that the PHP code will be used.
  5. Enter the variable(s) you wish to override. For example, if you would like to change "Register Now", you need to locate the proper variable within the /templates/lagom2/core/lang/cms/english.php file:
 'tld' => [
        'register_now'                              => 'Register Now',

Then place it in the overrides English file along with your preferred change:

<?php

return [
    'tld' =>[
        'register_now'                              => 'Register Now',
    ],
];
  1. To create new translation strings, you need to add a new array based on the below example. Please do not forget to create the override files for all languages that you are using in your WHMCS system.
<?php

return [
    'key_1' =>[
        'key_2'                              => 'Your custom translation string',
    ],
];

Your new translation can work in the Lagom WHMCS Website Builder files using the {$rslang->trans(key_1.key_2')} variable.

# Adding New Language

The language system in the Lagom WHMCS Website Builder allows you to add your own additional language translations. Before you begin, ensure that the language is properly created and configured in your WHMCS system. For detailed instructions on creating and customizing language files within WHMCS, visit Creating and Customizing Language Files (opens new window). Next, we recommend starting by duplicating one of the existing language files.

  1. Log in to FTP/SFTP of your WHMCS server.
  2. Go to /templates/lagom2/core/lang/cms and duplicate the english.php file.
  3. Rename the duplicated file. The language file name should be a single word consisting of only lowercase letters and numbers. The file has to end with the extension .php.
  4. Translate all strings located in your new language file.