How do I customize HESK text?
This guide works only with HESK version 2.7.0 or newer.
Do not edit the text.php file directly. Your modifications will be overwritten by future HESK updates!
Follow the steps below to customize the text instead.
» The short version (for PHP developers):
- Download the custom-text.php file
- The custom-text.php will be included after text.php, so copy any $hesklang value from text.php and modify it inside custom-text.php
- Make sure the custom-text.php file is saved in UTF-8 without BOM
- Upload the custom-text.php your /language/en folder
» A Step-by-step guide:
Let's say you want to change Submit a ticket text to Ask a question in your help desk.
Here are the recommended steps to do it:
- Download and install this powerful free text editor: Notepad++ .
- Download the custom-text.php file
- Open file custom-text.php in Notepad++
- Open HESK language file /language/en/text.php in Notepad++
- Copy any text you wish to edit from text.php to custom-text.php.
You need to copy everything from $ to ;
Example:
$hesklang['sub_support']='Submit a ticket'; - Modify the text value inside custom-text.php:
$hesklang['sub_support']='Ask a question';
When changing the text, pay attention to:-
only change the green text in example above
-
keep everything left of the = sign intact
-
keep single quotes (') around text
-
keep the semi-colon (;) at the end of line
-
if you use single quotes in the words escape them with a backslash (\)
WRONG: can't
CORRECT: can\'t -
keep any special codes such as %s and %d as they are used by HESK
-
- Save changes in custom-text.php
- Upload custom-text.php to your server, inside the /language/en directory
- Open custom-text.php file in your browser to check syntax, for example:
http://example.com/hesk/language/en/custom-text.php
If everything is OK you should get a message saying "No syntax errors detected in /custom-text.php".
If you get any errors then the PHP syntax is wrong. The error should give you line number with error, check syntax around that line; make sure all lines end with ";" and quotes are escaped with \'
- Test HESK to make sure it works OK and that the modified text appears
1. have at least Hesk 3.4.3 installed, and
2. after making the change, go to your Hesk Admin panel > Settings > General and Save changes.