Custom language translation
This changes allow user make own translation without overwrite vtiger language files. It's neccesary to change language directory structure into: language/modules/
like
language/modules/en_us/Leads.php
In this file you can add into language array your translation like: $languageStrings = array( 'LBL_ADD_RECORD' => 'Create new Leads', );
After migration into new vtiger version your translation will be not overwritten.
Merge request reports
Activity
Added 1 commit:
- 2dd6b7e2 - Custom language translation
Yes no problem, I was looking in vlayout directory and therefore my idea was use module directory. I will use custom directory for custom modules (extensions). I'm waiting if this code changes will be merged and they I will push some enhancement for transaltion of custom modules in vtiger standard modules. Like Payment module can create a translation key for Sales Order module( new Blocks, Fields, .....)
@lord_alan Hi, I didn't include your proposal in my merge request for i18n improvement !238 but it's all way compatible and a really nice idea. I'm also willing to fix some translations (I'm french) and it will be better to have more appropriate tools for this. Some of sentences are not well constructed for translations.
E.g., using
{vtranslate('LBL_NO')} {vtranslate($MODULE, $MODULE)} {vtranslate('LBL_FOUND')}.
for an empty list (No Leads found for instance). It's impossible to make a decent translation in many languages because sentence structure will be different. Worse, LBL_NO is used either in a label for a "Nope" button and for "None" results. If it works in english, it, at least, doesn't work in french.It's a better use in my opinion to write
{vtranslate('LBL_NODATA',$MODULE)}
and to customize LBL_NODATA in each module translation file (official or custom😄 )With my proposal, it can be
__mn('LBL_LISTFOUNDTOTAL',$MODULE,$LISTVIEW_COUNT)
with a per module customizable 'LBL_LISTFOUNDTOTAL' => '%d thing found' AND 'LBL_LISTFOUNDTOTAL_PLURAL' => '%d things found'