Download and enable an incomplete language

James Cole edited this page Jan 6, 2018 · 7 revisions

In order to view Firefly in a language that is not yet available (or when you're translating it) you need to take the following steps. If you do this, you should be able to (fairly easily) translate Firefly III to your target language. This guide is especially useful when you have a lot of translating to do, or when you want to check if everything is correct.

Enable the language

Contact me on Crowdin and ask me to enable the language you wish to translate into.

Create a folder for your language

Go to resources/lang. There you will find various folders called "en_US", "nl_NL", etc. Create one for your language, using the format used by the languages already listed. Examples include:

  • pt_BR (Portuguese (Brazil))
  • id_ID (Indonesian)

Copy language files

Copy all files from en_US into your new folder.

Edit configuration

Open config/firefly.php. Around line 128 you will see various languages listed. Copy and paste the last one and change it to match your language. For example:

'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portuguese (Brazil)'],

Select your language

Go to Firefly III and select your new language. It should be available in your preferences:

Language selection

Start translating!

After selecting your language, everything will be in English.

Go to the translation files

On your disk, go to the folder firefly-iii/resources/lang and then to the language of your choice, for example pl_PL for Polish:

Image

In this directory you will find the files Firefly III used to show a different language:

Image

Edit translation files

You can open these files in your favorite editor (please do not use Notepad, it will not work properly). Here is an example:

Image

If you edit these files you will see the results in Firefly III directly. This will help you translate quickly and easily. Of course, you must set your preferences to the language you're translating in.

To find out what string means what, open the Twig files in resources/views and find the strings ready to be translated. These are any of the following three examples:

{{ trans('firefly.test_string') }} # String from file firefly.php

{{ trans('csv.test_string') }} # String from file csv.php

{{ 'some_test_string'|_ }} # string from firefly.php (alternative method)

Important!

When a word has a colon in front of it, like so:

:description
:title
:count
:account

Please do NOT translate it. These are placeholders.

Upload the results

I am not sure if Crowdin allows you to upload the results to them directly (it does for me, but I'm admin). If you use this method to translate please send me any results by mail and I will update CrowdIn for you.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.