Introduction

Languages are part of the Theme Settings that allow you to add multiple languages to your webstore. You can add multiple languages to your webstore to reach a wider audience and provide a better shopping experience for your customers.

Selecting Languages

To select the languages for your webstore, follow the steps below:

1

Log in to Admin Panel

Log in to your Admin Panel.

2

Navigate to Theme Settings

Navigate to the Themes tab and select the theme you want to edit.

3

Select Languages

Scroll down to the “Language Settings” section.

4

Default Language

Select the “Default Language” for your webstore.

5

Selectable Languages

Select the “Selectable Languages” you want to add to your webstore.

6

Save Changes

Press “Save” or “Update” buttons next to the options to apply the changes.

Editing Language Files

To edit the language files, follow the steps below:

  1. Scroll down to the “Available Languages” section.
  2. Select the language you want to edit.
  3. Press the “Edit” button next to the language.
  4. You will get redirected to the Language Editor where you can edit the language strings.
  5. Press “Save” to apply the changes.
  6. Rebuild the template to apply the changes to your webstore.

The language files are stored in the /frontend/src/locales directory. You can edit the language files directly by modifying the JSON files.

Adding New Languages

Frontend Configuration

To add a new language to your webstore, follow the steps below:

  1. Open file manager.
  2. Navigate to the /frontend/src/locales directory.
  3. Press the “New File” button.
  4. Make a new file with the language code (e.g., en.json for English).
  5. Get the language strings from the en.json file and translate them to the new language.
  6. Save the file and press “Save” to apply the changes.

Backend Configuration

You also need to add the new language to the backend. To add a new language to the backend, follow the steps below:

  1. Connect to your VPS by using SFTP.
  2. Navigate to the /var/www/minestore/app/Http/Controllers directory.
  3. Open the SettingsController.php file.
  4. Use search to find the public static function getLanguages function.
  5. Add the new language to the $languagePack array.
        $languagePack = [
            'af' => 'Afrikaans',
            'ar' => 'Arabic',
            // other languages
            'zh-TW' => 'Chinese (Traditional)',
            'id' => 'Indonesian', // Example: 'id' => 'Indonesian',
        ];
  1. Save the file.
  2. Go to the Admin Panel and select the new language from the “Selectable Languages”.
  3. Press “Update” to apply the changes.
  4. Rebuild the template to apply the changes to your webstore.