Child pages
  • Guide to Locales - Distribute a Custom Locale
Skip to end of metadata
Go to start of metadata

Introduction

This guide explains how to distribute a custom locale from one server to another.

Notes:

  • In the following examples, German (de) is the customized locale to distribute. 
  • Not all locales are available by default. You can view the system's locales in the /var/cpanel/locale directory. These files possess the .cdb extension.
  • To distribute a custom locale to multiple target servers, you must repeat steps 3 through 5 on each target server.

Distribute a custom locale


Log in to the source server.

SSH in to the source server as the root user.

 


 

Run the /usr/local/cpanel/scripts/locale_export script.

Run the following command, where de represents the locale that you wish to export:

/usr/local/cpanel/scripts/locale_export --locale=de

This command creates the /var/cpanel/locale/export/de.xlf file.

Note:

To view additional options for this script, run the /usr/local/cpanel/scripts/locale_export --help command.

 


 

Use the scp command to copy the file to the target server.

For example, use the following command to distribute the de.xlf file to the server.example.com server:

scp /var/cpanel/locale/export/de.xlf root@server.example.com:/var/cpanel/locale/export/de.xlf

This command copies the locale file to the /var/cpanel/locale/export/de.xlf file on the server.example.com server.

 


 

Log in to the target server.

SSH in to the target server as the root user.

 


 

Run the /usr/local/cpanel/scripts/locale_import script to import the locale.

Run the following command, where de represents the locale that you wish to import:

/usr/local/cpanel/scripts/locale_import --locale=de

Note:

To view additional options for this script, run the /usr/local/cpanel/scripts/locale_import --help command. 

 


 

Recommended tips and tricks.

  • You may wish to set up a cron job to automate this process. For more information, read our Cron Jobs documentation.
  • You can use FTP to distribute the locale file to your servers. For more information, read our FTP Accounts documentation.