> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minestorecms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Multiple Languages

> You can add multiple languages to your webstore to reach a wider audience.

## 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:

<Steps>
  <Step title={"Log in to Admin Panel"}>
    Log in to your **Admin Panel**.
  </Step>

  <Step title={"Navigate to Theme Settings"}>
    Navigate to the **Themes** tab and select the theme you want to edit.
  </Step>

  <Step title={"Select Languages"}>
    Scroll down to the **"Language Settings"** section.
  </Step>

  <Step title={"Default Language"}>
    Select the **"Default Language"** for your webstore.
  </Step>

  <Step title={"Selectable Languages"}>
    Select the **"Selectable Languages"** you want to add to your webstore.
  </Step>

  <Step title={"Save Changes"}>
    Press **"Save"** or **"Update"** buttons next to the options to apply the changes.
  </Step>
</Steps>

## 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.

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

<CardGroup cols="1">
  <Card title="Rebuild Template" icon="wrench" href="/features/themes/editing-theme#build-template">
    Learn how to build the template to apply changes after editing the theme files.
  </Card>
</CardGroup>

## 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.

```php theme={null}
        $languagePack = [
            'af' => 'Afrikaans',
            'ar' => 'Arabic',
            // other languages
            'zh-TW' => 'Chinese (Traditional)',
            'id' => 'Indonesian', // Example: 'id' => 'Indonesian',
        ];
```

6. **Save** the file.
7. Go to the **Admin Panel** and select the new language from the **"Selectable Languages"**.
8. Press **"Update"** to apply the changes.
9. **Rebuild the template to apply the changes** to your webstore.
