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

# Languages

# Adding a Language

Learn how to change the language of Lagom WHMCS One Step Order Form module.

  1. Changing WHMCS module language is very simple. First of all, go to /modules/addons/LagomOrderForm/langs folder.
  2. Copy english.php file and rename the newly copied directory with your desired language, for example italian.php.
  3. Open your personalized file now and replace particular sentences with ease.

# Overrides

The language file english.php is uncoded and can be freely modified. However, it is advised not to change this file itself, it is recommended to use overrides.

  1. Open the overrides within the ~/lang/ directory.
  2. Next, create or copy the language file you are going to change. If you want to, for example, create an override for the English language, you will have to create the following directory: ~/lang/overrides/english.php.
  3. Open the just created file to edit its content.
  4. At the top of the file you must point the used code, for example: <?php for PHP code.
  5. Change the file content according to your needs. You may enter only single variables to be overridden or change all the lines in the language file.

For example:


$_LANG['order_new_product'] = 'You’re almost there! Complete your order';


$_LANG['order_new_product'] = 'Complete the order';

# Additional Fields Translation

All fields related to configurable options, including groups and suboptions, and order fields where you can enter a name or description can be translated to any language using the Smarty Langs method. Take a look below to learn how to do that easily.

  1. Open the option you wish to transalte in the addon, for example edit one of your configurable options ("Lagom One Step Order Form" → "Miscallanous" → "Configurable Options").
  2. Enter the Smarty code into the field that you intend to translate instead of your text, e.g .: {$_LANG.ToBeTranslated}
  1. Next, open your language file, for example italian.php and add a new entry at the very bottom: $_LANG['ToBeTranslated'] = "Titolo Tradotto";. As a reesult, you will receive "Titolo Tradotto" visible in the order form.

Important! It is possible to add translations from both the module level and directly in the WHMCS files. If you wish to add translation from the WHMCS level you will have to use a different variable that the one used in case of module translations, i.e.: $_LANG:

$LANG - without the "_" sign in the middle

Exemplary entries:

  • field in the addon: {$LANG.Titolo Tradotto}
  • line in the language file: $LANG['Titolo Tradotto'] = "Titolo Tradotto";