Create custom translation

There are two reasons to update the translation of the Filetransfer appliance.

  • Change the interface to a new language
  • Override existing translations with your own.

Base info

You can you only change the translation files if you have a license and have enabled console access. The files are located in /var/sfta/config/locales.

The translation system tries to be as smart as possible. It will fall back in multiple steps to base English. As an example, lets say that a Swiss French localization is added. It will have the base name of fr-CH. The translation system will search, in order:

  1. Translation file for Swiss French: fr-CH
  2. Translation file for French: fr
  3. Translation file for English: en

The upshot of this is that it's safe, the system will always find a string to use, and that it's easy to just override the strings that are needed.

The translation files are loaded and cached in the web application at boot. You will need to reboot the server after any change.

Adding a new language

Thanks in advance - everyone will benefit from your effort of translating the Filetransfer appliance in a new language.

Begin with the english translation file: /var/sfta/config/locales/en.yml and rename that to the appropriate ISO language code for that language. If your translating to French, use fr, if you're translating to Norwegian, use no, and so on.

The beginning of the english file is:

en:
  # The locale name (in English)
  locale: English

the first code: en must match the filename prefix. The English file is en.yml. The locale string is the name of the language in English - this is what's being displayed in the interface when selecting the different languages.

The rest of the file needs translating line for line. For date codes, general error codes and similar - please see this link for starting points.

As an example, if you're adding French localisation, copy the english file

cp /var/sfta/config/locales/en.yml /var/sfta/config/locales/fr.yml

Change the beginning of the file to read:

fr:
  locale: French

And continue with the rest of the file with French strings as replacement for the english ones.

When you are finished, please send your finished work to support@allardsoft.com.

Overrides

As an example override, please see the Australian English file: /var/sfta/config/locales/en-AU.yml. The only difference with Australian English is that the date formats differ from US English. US English uses MM/DD/YYYY where Australian English uses DD/MM/YYYY.

As can be seen in the en-AU.yml file, only the date formats are listed. The rest of the translation falls back to the English translation listed in the en.yml file.

If you want to create your own overrides for something, maybe you don't like that recipients are specified as “To” and you want recipients to be listed as “Recipients”. But you are happy with the rest of the English translation.

Create a file: /var/sfta/config/locales/en-XX.yml and fill it with the following content:

'en-XX':
  locale: English (my company override)

  send:
    recipients: Recipients

When you are finished, please reboot the server as the translation files are loaded and cached at boot. When the server has rebooted, you will see “English (my company override)” in the list of available languages.

filetransfer/translation14.txt · Last modified: 2011-04-13 10:32 (external edit)