React-native-ui-kitten: Can i change the calendar's language ?

Created on 3 Apr 2020  路  2Comments  路  Source: akveo/react-native-ui-kitten

Hi

My name is Jo茫o Victor, i'm from Brasil.

I'm working in a mobile app, and i'm using Ui Kitten for desing

My question is, can i change the calendar's language to portuguese ?

The name of my app is Radar do preconceito (in english is something like Prejudice Radar)

The Prejudice Radar is a project that have as a objective map all prejudice cases in Brasil using AI and geolocation

My users base are mostly composed by non english speakers

Could you help me ?

Thanks
Jo茫o Victor Antunes Figueira
Developer in Radar do Preconceito

UI Kitten and Eva version

| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | |
| @ui-kitten/components | |

Help wanted

Most helpful comment

Yes. There's several ways.

By default UI Kitten uses NativeService for handling dates (that is, using JS Date object), including any strings that are rendered by the Calendar components. That means that if your users' device locale is set to en-US they'll see months and days in English.

You can write your own Date Service, or use @ui-kitten/moment or @ui-kitten/date-fns and use their localization capabilities.

There's also a live example in the documentation on how to build your own sort of mappings between months, days and names.

All 2 comments

Yes. There's several ways.

By default UI Kitten uses NativeService for handling dates (that is, using JS Date object), including any strings that are rendered by the Calendar components. That means that if your users' device locale is set to en-US they'll see months and days in English.

You can write your own Date Service, or use @ui-kitten/moment or @ui-kitten/date-fns and use their localization capabilities.

There's also a live example in the documentation on how to build your own sort of mappings between months, days and names.

@lesmo is correct. You may find a simple way to do this in the docs. For more flexible localization options, @ui-kitten/date-fns or @ui-kitten/moment modules can be used.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iosdev-republicofapps picture iosdev-republicofapps  路  3Comments

sarmadkung picture sarmadkung  路  3Comments

Gitldx picture Gitldx  路  3Comments

betodasilva picture betodasilva  路  3Comments

domsterthebot picture domsterthebot  路  3Comments