Skip to content
Snippets Groups Projects

Custom language translation

Open its4you requested to merge its4you/vtigercrm:custom_language_translation into master

This changes allow user make own translation without overwrite vtiger language files. It's neccesary to change language directory structure into: language/modules/

language/language/
module.php file

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Excellent idea! I need this function and successfully tested it.

    Note: there is a little typo in description. It was meant to be languages/modules/en_us/Leads.php and not language/modules/en_us/Leads.php

  • its4you Added 1 commit:

    Added 1 commit:

    • 2dd6b7e2 - Custom language translation
  • This is OK as long as someone doesn't create a new module called "modules" ;-)

  • It might be a better idea having it being called something like "custom" to make it clear that these are non-standard files...

  • Author Contributor

    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'

  • Maintainer

    Keeping away custom folder out-off standard is one way to experiment, so it can be tracked easily.

  • Prasad Milestone removed

    Milestone removed

Please register or sign in to reply
Loading