https://kotlinlang.org logo
#compose-web
Title
# compose-web
j

John O'Reilly

12/02/2023, 1:43 PM
Anyone aware of way to get to convert a country code to a name in a Wasm based Compose for Web app?
j

John O'Reilly

12/02/2023, 2:36 PM
Thanks, will try that
👍 1
that worked, thanks!
Copy code
@JsFun(
    """ (countryCode) => {
        const regionNames = new Intl.DisplayNames(['en'], {type: 'region'});        
        return regionNames.of(countryCode)
    }
"""
)
external fun getCountryName(countryCode: String): String
👍 2
much better now 🙂
3 Views