Change a piece of wording
What this is: a tidy way to rename any text that appears in TSync — a button, a label, a menu item — to wording that fits your business. For example, you might prefer "Prospect" everywhere TSync says "Lead".
Why you care: there's a right way and a wrong way to do this. The wrong way (editing TSync's built-in text files) gets wiped out the next time you update. The right way puts your wording in a separate little file that updates never touch — so your changes stick around for good. This guide shows you the right way.
The trick is one special file called custom_lang.php. Anything you put there quietly overrides TSync's default wording, and stays safe through every update.
Step by step
1. Find the "name" of the text you want to change
Behind the scenes, every piece of text has a short label TSync uses to find it — for "New lead", the label is new_lead. You need that label so your override points at the right text.
The quickest way to find it is to search TSync's English text file for the words you see on screen:
# Look up where "New lead" comes from
grep -n "New lead" application/language/english/english_lang.php
It'll show you a line like this:
429:$lang['new_lead'] = 'New lead';
The bit inside the brackets — new_lead — is the label you want.
(There's also a built-in helper under Tools → Find Missing Translations that lists labels, which can be handy too.)
2. Create your custom_lang.php file
This is the safe file where your wording lives. Create it (if it isn't there already) inside the folder for your language:
application/language/<language>/custom_lang.php
For English, that's:
application/language/english/custom_lang.php
3. Write your new wording
Inside that file, list each label and the wording you'd like instead. The label on the left stays the same; the text in quotes on the right is yours to change:
<?php
$lang['new_lead'] = 'New prospect';
$lang['leads'] = 'Prospects';
$lang['lead'] = 'Prospect';
$lang['lead_status'] = 'Prospect status';
4. Save and take a look
Refresh the page in your browser with Ctrl + Shift + R (a "hard refresh" that ignores the cached version). Your new wording should appear right away — no restart needed.
Why this works
TSync reads its wording in a set order: first the built-in text, then your custom_lang.php. Because yours is read last, it gets the final say — your version simply replaces the default. That's the whole secret, and it's why updates can refresh the built-in text without ever stepping on yours.
Handy examples to copy
Rename "Lead" to "Prospect" everywhere
<?php
$lang['lead'] = 'Prospect';
$lang['leads'] = 'Prospects';
$lang['new_lead'] = 'New prospect';
$lang['lead_status'] = 'Prospect status';
$lang['lead_source'] = 'Prospect source';
$lang['leads_summary'] = 'Prospects summary';
$lang['lead_lowercase'] = 'prospect';
Reword the messages your customers see
<?php
$lang['client_invalid_username_or_password'] = 'Wrong email or password. Please try again.';
$lang['inactive_account'] = 'Account disabled. Contact your administrator.';
Relabel form fields
<?php
$lang['client_company'] = 'Company name';
$lang['client_vat_number'] = 'Tax ID';
$lang['clients_email'] = 'Contact email';
A few things to keep in mind
These are small, easy to follow, and they'll save you a headache:
- Keep the punctuation tidy. Each line needs to end with a semicolon (
;). A single missing one can make pages stop loading — so after editing, just refresh a page to confirm everything still opens. If a page misbehaves, a missed;is the first thing to check. - Watch out for apostrophes. The text is wrapped in single quotes. If your wording contains an apostrophe, put a backslash in front of it so it doesn't end the line early — for example
'L\'utilisateur'. - Only add and replace — don't delete TSync's lines. If you ever want a label to show nothing at all, set it to empty quotes:
$lang['xxx'] = '';
After you update TSync
Good news first: updates never overwrite custom_lang.php — your wording is safe. Two small things worth a glance afterward:
- New features may introduce new text you haven't customized yet — just add those labels when you spot them.
- Very occasionally a label gets renamed in a new version. If one of your overrides suddenly seems to "stop working", the original label was probably renamed — find the new one and update your file.