# Return error in user's regional language

**URL:** <https://community.auth0.com/t/return-error-in-users-regional-language/15510>\
**Category:** Get Help\
**Created:** [September 15, 2018, 2:59pm UTC](https://community.auth0.com/t/return-error-in-users-regional-language/15510 "2018-09-15T14:59:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jah](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jah/32/12805_2.png) [@jah](https://community.auth0.com/u/jah)\
**Post date:** [September 15, 2018, 2:59pm UTC](https://community.auth0.com/t/return-error-in-users-regional-language/15510/1 "2018-09-15T14:59:15Z")

</div>

Is there any way to return errors based on user’s regional language in rules? e,g if user is in USA then it returns error message in English but if user is in Sweden then it returns error in Swedish?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 9, 2018, 7:56am UTC](https://community.auth0.com/t/return-error-in-users-regional-language/15510/3 "2018-11-09T07:56:52Z")

</div>

Hey @jah!

So there are actually a few approaches to do that. The one I suggest is simply customizing your Lock error messages using language files that we provide. Here’s more on that:

> **[Lock Internationalization](https://auth0.com/docs/customize/internationalization-and-localization/lock-internationalization)**
>
> Lock v11 supports multiple languages, and allows for the addition of other custom language files, as well as for customizing the values of specific pieces of text that are displayed in the Lock widget.

> **[Customize Lock Error Messages](https://auth0.com/docs/customize/customize-lock-error-messages)**
>
> Customizing error messages with Lock v11

> **[lock/src/i18n at master · auth0/lock](https://github.com/auth0/lock/tree/master/src/i18n)**
>
> master/src/i18n

The other one is as you said rules. You can use the context object properties to achieve that but this one will actually require more work.

Let me know if that helps!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 9, 2018, 7:56am UTC](https://community.auth0.com/t/return-error-in-users-regional-language/15510/4 "2018-12-09T07:56:59Z")

</div>

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