**Customizing the eDirectory code requires an owned license version, as well as expertise with PHP development, CSS, MySQL, and the linux operating system.   eDirectory Support is not able to troubleshoot or assist with code customizations, however our Custom Development group is available for consulting engagements.  Make backups before making changes.**


eDirectory comes with language files for English, Brazilian Portuguese, French, Spanish, Italian, Turkish, and German.


1. Edit the translation of an existing language:


In order to edit an existing language, we suggest the following:


Each language has 3 files containing the translations that are located in the edirectory/web/lang folder.  




For example, for Turkish language the files are:

 

/lang/tr_tr.php                   (main translation file)
/lang/tr_tr_sitemgr.php    (translations for site manager area)
/lang/tr_tr.js                      (translations used in javascript functions)


Beyond the files above, there's also the following files to edit:


In edirectory/app/Resources/translations:



For example, for Turkish language the files are:

  • account.tr.xliff
  • administrator.tr.xliff
  • advertise.tr.xlf
  • consent.tr.xliff
  • filters.tr.xliff
  • gregwar_captcha.tr.xliff
  • messages.tr.xliff
  • recurring.tr.xlf
  • system.tr.xliff
  • units.tr.xlf
  • validators.tr.xliff
  • widgets.tr.xliff


After changing the necessary translations on the .xliff and .xlf files, the following command must be run on the /edirectory/ path to clear the cache: php -d memory_limit=-1 app/console cache:clear --env=prod


By following these steps, you will be able to edit the translation of any default languages (English, Brazilian Portuguese, French, Spanish, Italian, Turkish, and German).


2. Add support for a new language:


The easiest way to add support for a new language, is take the files for a language you are not using, and put in translations for your new language.  All the files mentioned above must be translated.


PHP and JavaScript files:


  • /lang/tr_tr.php
  • /lang/tr_tr_sitemgr.php
  • /lang/tr_tr.js     


XLIFF and XLF files:


  • account.tr.xliff
  • administrator.tr.xliff
  • advertise.tr.xlf
  • consent.tr.xliff
  • filters.tr.xliff
  • gregwar_captcha.tr.xliff
  • messages.tr.xliff
  • recurring.tr.xlf
  • system.tr.xliff
  • units.tr.xlf
  • validators.tr.xliff
  • widgets.tr.xliff


You can adapt to use a language your are not using to translate to the language you want, for example: If you are not using Turkish langauge, you can change those files and put the language of your preference, then you just need to navigate into Language & Geography > Language Settings and change to the Turkish (or any other language you choose to replace it).



** Important Note: You can edit the files, but not the name of it. Using the example above, you can use the Turkish or any other language files to put your own language, but you can't change the name of any files. **



Note:  eDirectory was written for left to right languages like English. Languages that are not left to right will likely experience layout problems.  


Note 2:  eDirectory was written for the UTF-8 character set.  Other character sets may cause system problems.


*Version 13.4 and below