Enswitch has two language specific components, the sound files played to callers, and the web interface. Some Enswitch systems will only need the sounds translated as all administrators can read and write English. Others will also need the web interface translated.
It's possible for your translation and the default files to co-exist. Please do not overwrite the Enswitch files under /opt/enswitch, otherwise future Enswitch upgrades may in turn overwrite your files. Instead, please put your files under /etc/enswitch where they will override the defaults.
To translate the sounds
- Copy the /opt/enswitch/current/doc/sounds.txt file from an Enswitch machine.
- Translate this file to your language.
- Review which Asterisk sound files under /var/lib/asterisk/sounds also need to be translated. For a default Enswitch system, these are vm-*, conf-*, and digits/*. Add these to the list.
- Have recordings made. These should be in 8KHz mono .wav format. If you have higher quality files, Asterisk may not be able to read them. If so, convert them to 8KHz mono and keep the master copies for future reference. When making recordings, preserve the directory structure. For example, put the "currencies/dollar.gsm" file in a subdirectory called "currencies". Put the Asterisk files in a subdirectory called "asterisk". For example, "asterisk/digits/1.gsm".
- Make a directory /etc/enswitch/sounds/<your language> where <your language> is your language code, for example "fr" for French.
- Upload the recorded files to this directory, preserving subdirectories.
- Move the files in the "asterisk" subdirectory to /var/lib/asterisk/sounds/<your language>/<path>. For example, /var/lib/asterisk/fr/digits.
To translate the new web interface
- Copy *.html from /opt/enswitch/current/web/src/app/components and its subdirectories from an Enswitch machine.
- Translate these files.
- Make a directory /etc/enswitch/templates/<your language> where <your language> is your language code. For example, "fr" for French.
- Upload the translated templates to this directory, preserving subdirectories.
- Copy /opt/enswitch/current/languages/en.conf from an Enswitch machine.
- Rename the file to your language, for example "fr.conf" for French.
- Translate the text after the = on each line. Do not translate the part before the =.
- Upload the translated file to /etc/enswitch/languages.
To translate the old web interface
- Copy *.tmpl from /opt/enswitch/current/templates/en and its subdirectories from an Enswitch machine.
- Translate these files.
- Make a directory /etc/enswitch/templates/<your language> where <your language> is your language code. For example, "fr" for French.
- Upload the translated templates to this directory, preserving subdirectories.
- Copy /opt/enswitch/current/languages/en.conf from an Enswitch machine.
- Rename the file to your language, for example "fr.conf" for French.
- Translate the text after the = on each line. Do not translate the part before the =.
- Upload the translated file to /etc/enswitch/languages.
To translate invoices
- PDF invoices can be modified for individual languages using rate plan custom settings.
- XML invoices must be copied from /opt/enswitch/current/templates/en/invoices/ to /etc/enswitch/templates/<your language>/invoices/, and edited to suit.
To enable the new language, create a new file /etc/enswitch/languages.conf on all machines in the cluster with the following format. This example is for English as shipped with the product and a new French translation:
# Code = Name, Name HTML, Templates, Config file, Sounds, Asterisk, en = English, English, en, en, en, en, fr = Français, Français, fr, fr, local/fr, fr,
What the fields mean:
- Code is how the language setting is stored in the database. ISO codes are recommended.
- Name is the name of the language. Accented characters may be used.
- Name HTML is the name using HTML encoding for any accented characters.
- Templates specifies the directory under /etc/enswitch/templates where you put your translated templates.
- Config file specifies the filename (without the ".conf") under /etc/enswitch/languages where you put your translated en.conf.
- Sounds specifies the directory under /etc/enswitch/sounds where you put your translated sounds. Add a prefix of "local/".
- Asterisk specifies the language to instruct Asterisk to use.