Allow retrieving localized names for countries-list resource

Created on 14 May 2024, 6 months ago
Updated 8 July 2024, 4 months ago

Problem/Motivation

We have a case where we need country names translated to the current language selected.

For example, when requesting:
/en/address-decoupled/api/countries-list
the list should have items like:

US: {
 countryCode: "US",
 name: "United States",
 threeLetterCode: "USA",
 numericCode: "840",
 currencyCode: "USD",
 locale: "en"
},

and when requesting:
/ar/address-decoupled/api/countries-list
the list should have items like:

US: {
 countryCode: "US",
 name: "الولايات المتحدة",
 threeLetterCode: "USA",
 numericCode: "840",
 currencyCode: "USD",
 locale: "ar"
},

This is not available with the current implementation.

Steps to reproduce

After installing the module, enable another language, setup language detection and selection, then try requesting the resoure.

Proposed resolution

use current language to get the list.

Remaining tasks

  1. Do the same thing for listing store countries

User interface changes

None.

API changes

None.

Data model changes

None

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇯🇴Jordan Yasser Samman Amman, Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024