Skip to content
Snippets Groups Projects

Custom translation for module

Merged its4you requested to merge its4you/vtigercrm:custom_language_translation_vtiger7x into master

Custom translation without overwrite vtiger core files, for all modules defined in languages/custom/

language/language/
module.php file(s)

1/ You need to create a /custom directory in /languages directory

2/ Then create $language (en_us, de_de, ....) sub-directory

3/ Create a tranlation file like Accounts.php in languages/custom/en_us/ directory and define new tranlation or overwrite existing translations keys.

This small change will keep original Vtiger language file and allow users to upgrade Vtiger version without lossing own translaction.

Merge request reports

Merged by avatar (Mar 22, 2025 12:57pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 👍

  • Great suggestion!

    How about if the /custom directory was moved to the root of vtiger instead? So you have like:

    /custom/languages/en_us/Accounts.php

    Then in the future there would be less to do to allow things like:

    /custom/layouts/v7/modules/Vtiger/RecentActivities.tpl

    or

    /custom/modules/Vtiger/models/Field.php

    for example?

  • Author Contributor

    @lord_alan Hmm I was thinking about languages for now. But yes your solution seems to be better. I want use a positive time when many changes are merged to Vtiger ;-)

  • Uma Status changed to merged

    Status changed to merged

  • Uma mentioned in commit 791b5ab6

    mentioned in commit 791b5ab6

  • @its4you Thank you! It's been Merged.

  • Author Contributor

    @uma.s Also thanks to you for the Merge(s). For now, Vtiger can move forward

  • @uma.s Did you read my suggested change? Instead of languages/custom/en... start from the root and use /custom/languages/en_...? That way, maybe later we could also support overriding of core module files and layouts etc...?

  • Author Contributor

    I know @lord_alan, but I'm really happy that this was merged. Because we have many many customers with own translation and every upgrade we have to merge it and recreate it again. Organization module translate to Accounts Organization module translate to Clients Organization module translate to Customers each customer need it different

    Maybe /custom directory will be possible in vtiger 8 ;-)

  • Hi @lord_alan,

    I read your suggestions, That's really a great way to deal with customizations, will get it reviewed asap and keep you posted.

    Thank you!

  • +1

    We use this approach internally at Automate SMB, further we also have introduced a config variable in config.inc.php to have a client name/project code. And then under the custom directory we have a sub level.

    Such as-

    Generic changes: custom/generic/languages/ custom/generic/modules/

    Project specific:

    custom/project1/languages custom/project1/modules

    The sequence to be followed then is-

    1. project specific folder
    2. generic custom folder

    and then the normal Vtiger directory structure.

    Though one trouble in this approach is class name declaration. You can end up in having duplicate class names.

  • It would be great to have custom tpls

Please register or sign in to reply
Loading