Translating Hellaplus

New functionality was added in Hellaplus v1.2 to support translation files. This information does not apply to earlier releases of Hellaplus.

Included with the product is US English translation files. You can easily create your own translation files by following this simple process.

Step 1: Create a new language folder

The translation files are stored in a folder for each language and stored under the lang folder.

Create a new folder underneath your lang folder, for example, if you were creating a French version, create a folder called “fr_FR”.

Step 2: Make a copy of the translation files

Copy all files in the folder /lang/en_US/ to our newly created folder. You should have the following files in it:

auth.php
budget.php
expenses.php
income.php
lang.js
overview.php
pages.php
settings.php
simcify-lang.js
table_lang.json

Step 3: Translate the language files

We now need to open up each of the above files in newly created folder and change the strings.

For example, initially the file look like this:

<?php

return [

    'page' => [
        'title' => 'Login',
    ],

    'links' => [
        'forgot' => 'Forgot Password?',
        'create' => 'Create an account',
        'login' => 'Login Now',
    ],

    'button'    => [
        'login' => 'Login Now',
        'create' => 'Create Account',
        'reset' => 'Reset Password',
    ],

We will translate the values after the => sign only. If we were creating a French version, this will give the result below:

<?php

return [

    'page' => [
        'title' => 'Connexion',
    ],

    'links' => [
        'forgot' => 'Mot de passe oublié?',
        'create' => 'Créer un compte',
        'login' => 'Connecte-toi maintenant',
    ],

    'button'    => [
        'login' => 'Connecte-toi maintenant',
        'create' => 'Créer un compte',
        'reset' => 'Réinitialiser le mot de passe',
    ],

Step 4: Translate the language files

Finally, we alter the .env file and change the APP_LOCALE_DEFAULT setting from

APP_LOCALE_DEFAULT=en_US

to

APP_LOCALE_DEFAULT=fr_FR

And that’s it. When you now visit your site, the text shown will come from your new translation files!

What's your reaction?
1COOL0WTF0LOVE0LOL