Frezka SaaS - Documentation

How add a new language into Admin Panel?

To help your customers access the system in their preferred language, you can easily add a new language through the Admin Panel. Follow the steps below:

πŸ“ Step 1: Duplicate the Existing English Folder

  1. Navigate to the /lang directory of your project.
  2. Find the folder named en (English).
  3. Copy the en folder and paste it into the same /lang directory.
  4. Rename the copied folder to the language code of your new language.
    πŸ‘‰ For example, if you’re adding Portuguese, rename it to pr.

βš™οΈ Step 2: Register the New Language in Configuration

  1. Open the file: config/app.php.
  2. Find the 'available_locales' array.
  3. Add your new language code and name inside the array. Example:
'available_locales' => [
'ar' => 'Ψ§Ω„ΨΉΨ±Ψ¨ΫŒ (AR)',
'en' => 'English (EN)',
'el' => 'Greek (EL)',
'fr' => 'French (FR)',
'de' => 'German (DE)',
'pr' => 'Portuguese (PR)',
],

πŸ” Step 3: Clear Configuration Cache

After updating the config file, you need to clear the Laravel config cache.

πŸ”§ Run the following command in your terminal:

php artisan config:clear

πŸ–₯️ Step 4: Add and Update Language from Admin Panel

Now it’s time to enable and configure the new language in the Admin Panel.

πŸ‘‰ Navigate to:

Admin Panel β†’ Settings β†’ Language Settings

βž• Select New Language:

  1. From the dropdown, select the new language code β€” for example, pr.

✏️ Edit Translation Values:

  1. You will see all the translation keys.
  2. Enter the translated values for each key in your selected language.

πŸ’Ύ Click “Save”:

  1. After updating translations, click the Save button to apply changes.

βœ… Your new language is now added and active in the system.