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, whereas others will also need the web interface changed. Alternatively, you may want to replace the existing sound or text without adding a new language.
It's possible for your change 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 change the sounds
- Copy the /opt/enswitch/current/doc/sounds.txt file from an Enswitch machine.
- If using a new language, 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. 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 "en" for English or "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 change the web interface
- Copy *.html from /opt/enswitch/current/web/src/app/components and its subdirectories from an Enswitch machine.
- Change these files.
- Make a directory /etc/enswitch/<your language> where <your language> is the language code. For example, "en" for English or "fr" for French.
- Upload the changed templates to this directory, preserving subdirectories.
- Enable use of these templates by adding to /etc/enswitch/domains.ini:
[*] templates = /local
- To use the templates with only one domain put them in a subdirectory such as /etc/enswitch/example.domain.com/<your language>. Enable use of these templates by adding to /etc/enswitch/domains.ini:
[example.domain.com] templates = /local/example.domain.com
- Copy /opt/enswitch/current/languages/en.conf from an Enswitch machine.
- Rename the file to your language, for example "en.conf" for English or "fr.conf" for French.
- Change the text after the = on each line. Do not change the part before the =.
- Upload the changed file to /etc/enswitch/languages/.
To change 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 a 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/ 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.