Auth0 Home Blog Docs

Lock Language Dictionary in Wordpress plugin

wordpress
dictionary

#1

I’m trying to update some text on the lock widget for our site – using the WordPress plugin. And we’re still using lock 9.2.

I’ve found some basic info, but I’m not sure how to enter it so that the text is recognized. I get a message that says:

“The language dictionary parameter should be a valid json object.”

Is there a place where I can find how to enter the new text in the right format? Most of what I’ve found is not for use specifically in the WordPress plugin.


#2

Can you update your question with the languageDictionary attribute you are trying to update, and the value you are trying to update it to?


#3

Thanks! I’ve gotten it to not give me an error – but the code doesn’t change any of the output. This is what worked (as in not giving the json error):

{
"dict": {
"signin": {
"welcome": "Welcome HealthDoers!",
"signupTitle": "First Time Log In",
"signUpLabel": "First Time Log In",
"signUpSubmitLabel": "First Time Log In",
"title": "Log me in"
}
}
}

We’re in WP 4.7.4 and using Login by Auth0 plugin 3.2.19 (though, we tried this in 3.2.14, as well – same results). All with lock version 9.2.


#4

So, the link to the dictionary for 9.2 is here: https://github.com/auth0/lock/blob/v9.2.3/i18n/en.json

And this is the code that ended up working in the Login by Auth0 WordPress plugin (thanks to Auth0 support!):

{ 
"signin": { 
"signinText": "Log Me In", 
"signupText": "Returning Members: Log In", 
"footerText": "Questions? contact@email.org", 
"title": "Welcome!" 
} ,
"signup": { 
"signinText": "Log Me In", 
"signupText": "Returning Members: Log In", 
"footerText": "Questions? contact@email.org", 
"title": "Welcome!" 
} 
}

#5