Skip to content

Localization Guidelines

Nathan Broadbent edited this page Mar 1, 2012 · 8 revisions

Localization Guidelines

Create a Fat Free CRM fork by visiting the Github project page and clicking the fork button. This will fork (copy) the main repository to your github account. Clone your forked repository to your computer by typing:

$ git clone git@github.com:{your-username}/fat_free_crm.git

Follow the Fat Free CRM installation instructions.

Once you have it up and running take a look at locale files in config/locales directory.

Each language will have two files:

  • {locale}.yml - contains Ruby on Rails translations maintained by rails-i18n
  • {locale}_fat_free_crm.yml - contains Fat Free CRM-specific messages (this is the one that requires translation.)

Start by copying the US/English locale file, for example:

$ cp config/locale/en-US_fat_free_crm.yml config/locale/fi_fat_free_crm.yml

Change the first two lines in your new {locale}_fat_free_crm.yml file to specify your locale and language names, then proceed with translating individual messages.

To test your translation change the Language option on the User's Profile page. Fat Free CRM should reload the page with the currently selected language. To change the default language setting, add or edit the :locale key in config/settings.yml, then restart your server.

To commit your changes and push them to Github, do the following:


# See list of changed files
$ git status
 
# See actual changes within files
$ git diff     

# Add all changed files
$ git add .   

# Commit changes
$ git commit -a -m "Translated to {language}"

# Push changes to your repository on Github
$ git push origin master

Finally, send a "pull request" so that your translation can be merged into the master branch. If you haven't done this before, please read Github's support page for pull requests.