# ERROR RangeError: locale must contain localize property

**URL:** <https://community.sendbird.com/t/error-rangeerror-locale-must-contain-localize-property/9857>\
**Category:** Miscellaneous\
**Tags:** group-channel, chatsdk, react-native\
**Created:** [July 31, 2024, 1:27pm UTC](https://community.sendbird.com/t/error-rangeerror-locale-must-contain-localize-property/9857 "2024-07-31T13:27:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagarchavan491](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@sagarchavan491](https://community.sendbird.com/u/sagarchavan491)\
**Post date:** [July 31, 2024, 1:27pm UTC](https://community.sendbird.com/t/error-rangeerror-locale-must-contain-localize-property/9857/1 "2024-07-31T13:27:40Z")

</div>

I am trying to configure the sendbird’s React Native UIKit in my app. I am facing one weird issue as: ERROR RangeError: locale must contain localize property  
I tried to add the prop localization={{ stringSet: StringSetEn }} in SendbirdUIKitContainer but still, whenever every time I navigate to the GroupChannelList screen now, I am seeing this error.  
I started getting this error when I tried to send a message in the channel I had created. How do I fix it?

---

<div class="post-metadata">

**Author:** ![Knekte](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/knekte/32/5066_2.png) [@Knekte](https://community.sendbird.com/u/Knekte)\
**Post date:** [August 5, 2024, 7:57pm UTC](https://community.sendbird.com/t/error-rangeerror-locale-must-contain-localize-property/9857/2 "2024-08-05T19:57:11Z")

</div>

I got this to work by uninstalling date-fns then  
npm install date-fns@2.28.0

then in my App.tsx

import { format } from ‘date-fns’;  
import { enUS } from ‘date-fns/locale’;

then inside the function but before the return statement add  
const date = new Date();  
const formattedDate = format(date, ‘dd MMM yyyy’, { locale: enUS });

---

<div class="post-metadata">

**Author:** ![sagarchavan491](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@sagarchavan491](https://community.sendbird.com/u/sagarchavan491)\
**Post date:** [August 6, 2024, 6:40am UTC](https://community.sendbird.com/t/error-rangeerror-locale-must-contain-localize-property/9857/3 "2024-08-06T06:40:57Z")

</div>

> [@Knekte](#):
>
> formattedDate

and where to add formattedDate? there is one prop localization as I mentioned above in the error details and I tried to apply it but it’s not working
