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

  1. Copy the /opt/enswitch/current/doc/sounds.txt file from an Enswitch machine.
  2. Translate this file to your language.
  3. 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.
  4. Have recordings made. These should be in 1 channel 8KHz .gsm format. You may care to keep .wav masters 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".
  5. Make a directory /etc/enswitch/sounds/<your language> where <your language> is your language code, for example "fr" for French.
  6. Upload the recorded files to this directory, preserving subdirectories.
  7. 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 web interface

  1. Copy *.tmpl from /opt/enswitch/current/templates/en and its subdirectories from an Enswitch machine.
  2. Translate these files.
  3. Make a directory /etc/enswitch/templates/<your language> where <your language> is your language code. For example, "fr" for French.
  4. Upload the translated templates to this directory, preserving subdirectories.
  5. Copy /opt/enswitch/current/languages/en.conf from an Enswitch machine.
  6. Rename the file to your language, for example "fr.conf" for French.
  7. Translate the text after the = on each line. Do not translate the part before the =.
  8. Upload the translated file to /etc/enswitch/languages.

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&ccedil;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.