> For the complete documentation index, see [llms.txt](https://msupport.gitbook.io/equicare/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://msupport.gitbook.io/equicare/getting-started/language-integration-setup.md).

# Language Integration Setup

**Use the following steps to configure and activate an additional language (for example, Spanish - 'es').**

### STEP 1 : Create a Language Translation Folder

1. **Go to the following directory:**

&#x20;      • framework/resources/lang/

2. **Inside this folder, create a new folder for your language.**

&#x20;        • Example (for Spanish):

&#x20;       • framework/resources/lang/es

3. **Inside your new language folder, add 7 translation files (just like the English version).**

&#x20;      • You can copy the default English translation files from:

&#x20;      • framework/resources/lang/en

**Then translate the text inside each file into your new language.**

### Step 2 : Set Your Language in Middleware

1. **Open this file:**

&#x20;      • framework/app/Http/Middleware/LanguageMiddleware.php

2. **Replace the 'handle' function with the following code:**

&#x20;       public function handle(Request $request, Closure $next)\
&#x20;    {\
&#x20;            // You can set your language folder name here\
&#x20;           // (like 'en' for English, 'es' for Spanish)\
&#x20;           $language = env('locale') ?? 'es';\
&#x20;           App::setLocale($language);

&#x20;          return $next($request);

&#x20;     }

### STEP 3: Update the App Configuration

1. **Open this file :**

&#x20;      • framework/.env

2. **Set your language folder name like this :**

&#x20;      • locale=es[<br>](https://app.gitbook.com/o/WoXZFEs33ioROvY3SSIy/s/vQwJKrRXNIbABMuM9nOk/getting-started/installation-guide)
