datetime localization (dutch)

Please provide the following:

  1. SDK Version: 36.0.0.
  2. Platforms(Androidl):
  3. System language contains nl-NL and en-US.

Hi,
I’m trying to create an andriod app in Dutch (nl-NL)

I installed expo-localization to show labels in Dutch.

However, showing a date (new Date().toLocaleString()) does not show Dutch.
Instead it shows: Fri Feb 21 11:57:35

Locale information is showing nl-NL
{i18n.locale} -
{Localization.locale} -

Can somebody help me out?

Maybe this is the solution you’re looking for?
new Date().toLocaleString(Localization.region)

Hi, thank you for the fast reply and the suggestion.

It did not work though.

If I try i18n.l(“currency”, 1990.99), I see $1,990.99.

Is there any sample project I can check out related to localization?

Please help!

I used this code in one of my Dutch apps, for the currency:

if (Platform.OS === 'android') {
   // only android needs polyfill
    await require('intl'); // import intl object
    await require('intl/locale-data/jsonp/nl-NL'); // load the required locale detail
}
const balance = 1990.99;
console.log(
    'My dutch bank account, balance:',
    new Intl.NumberFormat('nl-NL', { style: 'currency', currency: 'EUR' }).format(balance)
);

Maybe the Intl DateTimeFormat function will do the job on android, for your date.

Thank you, this seems to work. (without i18n)

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.