Overwrite Translation Text


If you need to overwrite some translation text you can create your own custom language file.

This is used if you want to change some text in the main translation files which comes with Perfex CRM installation and prevent your changes to be overwritten during an update.

This is an example of the English language.

Navigate to application/language/english and create custom_lang.php file.

Add the following line at the top:

<?php

Copy the whole part and add it to custom_lang.php

$lang['home_stats_full_report'] = 'Report';

You can notice that is changed Report. Now Full Report will be displayed as Report

You can use the core language file located in application/language/english/english_lang.php and search for the language keys you want to change.

The full custom_lang.php will look like this:

<?php
$lang['home_stats_full_report'] = 'Report';

Encoding

Language files in Perfex CRM use the UTF-8 encoding without a Byte Order Marker, when creating language override files it is important to maintain the same encoding.

Special Characters

If you want to use the ‘ character in your translation text you have to replace it with \’

Eq:

$lang['language_text_key'] = 'Text with \'quotes';

Modules

If you are using version 2.3.0 or above you can achieve this also for the modules language files if the module is using language files and have them registered.

The process is the same for the modules too, only the location is in modules/[module-name]/language/[language-to-overwrite]/custom_lang.php


Did you find this article useful?



  • PDF Customization

    File Location This is a general example how to modify the invoice PDF file, check on the bottom of this article for other PDF documents file location...

  • Customers Templates

    If you want to change the client area look copy the existing main theme Perfex located in application/views/themes/ and rename to your theme...

  • Action Hooks

    Perfex CRM support various action hooks all over the code to give the buyers the best experience. Create file with name my_functions_helper.php&...

  • Applying custom CSS styles

    Perfex CRM supports custom.css file that will be autoloaded all over the CRM to apply your custom styles. This file don’t exists...

  • Add Full Size Login Background Image

    Perfex CRM does not officially support login background image for admin area and customers area to keep the simplicity, but we created simple CSS...