Notifications
Clear all

[Solved] Cant find strings to translate

5 Posts
2 Users
1 Reactions
145 Views
Posts: 6
Topic starter
(@sburlot)
Active Member
Joined: 2 months ago

Hi,

I cant find the strings in the register dialog to translate: the word "required" and the error message "Please fill in this field".

I tried to add them in Phrases, tried to add them to the .pot file, doesnt work.

Where are they defined?

Thanks,

Stephan

Β 

Topic Tags
4 Replies
Sofy
Posts: 4482
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi,

Posted by: @sburlot

the error message "Please fill in this field".

This depends on the browser language.Β 

Regarding the "required" fields, could you please provide information on how those fields were added? They don't appear to belong to the core wpForo plugin.

2 Replies
(@sburlot)
Joined: 2 months ago

Active Member
Posts: 6

@sofy you're absolutely right: the wp-members plugins adds registration fields, I dont know yet how to prevent it

For the "Please fill in this field", how can I display it in French? The site and forum are in french

Thanks,

Stephan

Β 

Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4482

@sburlotΒ 

As I have already mentioned it depends on the browser language. Once you change the browser language, the phrase language will be changed as wellΒ 

Posts: 6
Topic starter
(@sburlot)
Active Member
Joined: 2 months ago

OK, as @sofy wrote, it depends on the browser language.

But why? I found the reason. Although the site is in french, wpforo is in french, this message appears in english because my browser (and my system) is in english.

The sentence "Please fill in this field." is an HTML5 feature and can't be easily customised* and will appear in whatever language the browser is set to which is weird IMHO.

I just wanted to make sure the customer will not see english messages and I can explain her why if it ever happens.

*it can be customised using a lot of JS:
https://www.telerik.com/blogs/building-html5-form-validation-bubble-replacements

or by using theΒ setCustomValidity JS method, but you'll have to check all validity codes.

Usually form validation is handled by javascript or XHR, first time I see it handled directly by HTML5 in code I manage.

Kind of went down the rabbit hole to find why, now I can get back to work.

Thanks to @sofy for the help!