Support

Home Forums Translations Strings not translated although in .mo file PART 2

Strings not translated although in .mo file PART 2

Posted: July 7, 2016 at 3:22 am


ARAGATO

July 7, 2016 at 3:22 am

Orginal Post:
https://eventespresso.com/topic/some-strings-not-translated-although-translated-in-the-used-mo-file/

Again this weird phenomenon where a string is not being translated in the front-end although it is translated in the .mo
http://uploads.aragato-server.net/screenshots/2016070734dc28643c.jpg
http://uploads.aragato-server.net/screenshots/20160707643ac322ed.jpg

According to the first post, I thoroughly checked the .po for other strings that might be the correct one, but cannot find anything.


Josh

  • Support Staff

July 7, 2016 at 8:20 am

There’s nothing weird going on here.

The string “This field is required” isn’t taken from a PHP file, it’s taken from the database. You set the value for the question validation message in the Event Espresso > registration form > Questions, in the Required Text field.


ARAGATO

July 8, 2016 at 5:01 am

This is not a question field. It is the login field.


Josh

  • Support Staff

July 8, 2016 at 9:45 am

Oh! Well that sounds like a string from another plugin then, and isn’t going to be translated from an Event Espresso translation file.


ARAGATO

July 8, 2016 at 9:54 am

But its on your login site.
I use force login on my events. So if the user is not logged in, evey event shows the login first, which is a part of EE, isn’t it?


ARAGATO

July 8, 2016 at 10:00 am

Here the id of the fields:
http://uploads.aragato-server.net/screenshots/2016070860eba17f3c.jpg

It is an EE field.


Josh

  • Support Staff

July 8, 2016 at 12:57 pm

The actual string you’re seeing is coming from the jQuery Validator plugin, and doesn’t use the same translation methods as the PHP scripts do. You can translate this string using a bit of JavaScript, and a really good way to add the script to the page is to use the wp_add_inline_script() function.

Here’s a readymade code example you can use:

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


ARAGATO

July 11, 2016 at 2:47 am

Josh, you are the man!
Solved.

The support post ‘Strings not translated although in .mo file PART 2’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Status: closed

Updated by  ARAGATO 4 years, 6 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!