# Language Selection Screen

## Language API

The Country API with Language Data allows users to select their preferred country and language within the e-commerce application. This API provides a comprehensive list of available countries, along with their corresponding supported languages, allowing users to choose their location and preferred language for viewing app content.

<figure><img src="https://3686328336-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1Iq7THDAagTQzeC9rTN%2Fuploads%2FmAr1JXDTw4j4MKO4XL3G%2Fimage.png?alt=media&#x26;token=78927f75-ee06-4148-9e3d-fa331b6d6fa5" alt=""><figcaption><p><strong>Language selection interface</strong></p></figcaption></figure>

### Endpoint

* `{{baseurl}}/api/v1/countries`

### Method

* GET

### Request Parameters

The Country API does not require any specific request parameters.

### Response Format

The API responds with a JSON object containing a list of available countries and their corresponding details, such as country code, name, currency, and supported languages.

```json
  {
    "status": true,
    "data": {
        "countries": [
            {
                "id": 10,
                "name": "India",
                "code": "IN",
                "currency_name": "Rupee",
                "currency_symbol": "₹",
                "symbol_position": "left",
                "icon": "https://majarat-developemt.s3.ap-southeast-1.wasabisys.com/uploads/all/Flag_of_India-1024x683.png",
                "languages": [
                    {
                        "id": 1,
                        "name": "English",
                        "code": "en",
                        "direction": "ltr"
                    },
                    {
                        "id": 39,
                        "name": "Arabic",
                        "code": "ar",
                        "direction": "rtl"
                    }
                ]
            }
        ]
    },
    "message": "Success"
}
```

### Features

* **Country Selection**: The API enables users to select their country from the list of available options, tailoring the app's content and services to match the selected location.
* **Language Selection**: Alongside the country data, the API provides information about the supported languages for each country, allowing users to choose their preferred language for viewing the app's content.
* **Currency Localization**: By selecting a country, the app can automatically set the appropriate currency for displaying product prices and conducting transactions.
* **Cultural Relevance**: The Country API, coupled with language data, ensures that the app's content is culturally relevant and resonates with users in their preferred language.

### Usage

The Country API with Language Data is typically utilized during the app's onboarding process or settings section. By making a GET request to the API, the app fetches the list of available countries along with their supported languages, and presents it to the user for selection.
