Custom language dictionary for Lock

Hello !

I’ trying to support multiple languages in Lock but with my own dictionary ( texts ). I don’t want to hardcode the dictionaries in the template because that’s is not maintainable if I have multiple languages. I tried using the “languageBasedUrl” option of Lock but even when using the exact same “.js” default file from Lock’s repo it throw’s this error: "Uncaught SyntaxError: Unexpected token ‘export’ ".

Hi, @hugo-villalta - welcome to the Auth0 Community!

A couple of things here:

  • Please, make sure you’re using the right variable. It should be languageBaseUrl, not languageBasedUrl
  • Please, note that this takes the base URL and not the full link. So, your directory structure will have to follow the same as our CDN

Let me know if these two help clarify and resolve the issue.


I’m using “languageBasedUrl” yes and I’m also following the same folder structure as the cdn . The problem seems to be the structure of the .js file for some reason. I even download the original .js file from the cdn and didn’t worked.

Hello, @hugo-villalta,

It seems like you might be using the wrong variable. You have an extra D.

Could you please double check?


Sorry, that was a typo here but my code is fine. Issue still persist. Auth0 does find the file but saying it has a wrong format. That is my issue.

Hello, @hugo-villalta,

Could you please share the URL that you are putting in the variable, and the URL of the file, so that I can attempt to reproduce it on my end?



I’m using “languageBasedUrl” yes and I’m also following the same folder structure as the cdn navyarmyccu.