Back

Why currency is always an empty string? I'm using

  • 0
  • Web
<hadnet/>
19 Mar, 2025, 03:11
TypeScript
const locale = new Locale(client);
const userLocale = await locale.get();

But always got something like this

TypeScript
{"ip":"xxx.xx.xxx.xxx","countryCode":"AR","country":"Argentina","continentCode":"SA","continent":"South America","eu":false,"currency":""}

Why is currency empty?

TL;DR
Developers are encountering an issue where the currency value is empty when trying to set the locale using the given code snippet. This could be due to incorrect data being returned or a problem with the 'get' function. Check if the 'get' function is correctly implemented and returning the expected currency value.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more