Allow retrieving localized names for countries-list resource

Created on 14 May 2024, about 2 months ago
Updated 24 June 2024, 7 days 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.69.0 2024