Project initialization


The Transifex Client is very similar to the way most VCS systems handle initialization. The command will create a new project in the current directory. This will allow you to manage all translation files that exist under the project's root directory.

​Where to run init from

You may run this command from anywhere on your filesystem, but we usually recommend running it in the project's root directory. When run, it creates a small file which stores the association between your local files and Transifex resources.

If you have a project which uses version control and would like to commit this config file, run the init command from the root directory of your repo. This will make the files available to anyone who clones the repository.

You might be managing multiple projects and would like a single configuration file. This is common with translators who use the client to manage their contributions across projects. In this case, you may run this command from a top-level directory.

A sample client init

To initialize a project, use the tx init command. This is very similar to the way most version control systems handle initialization. This command will create a Transifex project in the current directory.

Here's a sample run:

$ tx init
Creating .tx folder...
Transifex instance [https://www.transifex.com]:

Press Enter

Creating skeleton...
Creating config file...
Done.

It is safer to use encrypted HTTP (HTTPS) instead of plain HTTP in order to avoid having your user credentials crossing the wire out in the open. If you are using the client against the Transifex.com servers, the client will ask for your permission to switch all URLs to HTTPS.

In case a user uses social authentication to log in to Transifex (that is Facebook, LinkedIn, Twitter etc. credentials), she/he needs to generate a Transifex password first and use that when configuring the client. You can generate or change your password through your account settings page.

Automate project initialization

To initialize a project, use the `tx init` command.

If you want to automate the project initialization, the init command offers some options to set the default host, username and password so that you can use it with non-interactive scripts. For more information, check the help page of the command:

tx help init