Jump to content
Latest News: (loading..)
lhi10

How to translate Edge / Frozen V 2.3.4.1 Information / Error Messages

Recommended Posts

How to translate Edge / Frozen V 2.3.4.1 Information / Error Messages

For example, "Please, fill out this field."

On previous version a file language.php contain a translation but not is Edge/Frozen edition.

Thank you.

 

 

Share this post


Link to post
Share on other sites

@lhi10

Specifically, which page are you seeing "Please, fill out this field." that you want to change?

M


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

Contact_us.php for example.

Create_account.php when forgeting gender information, male or female, "Please, select one of these options."

Share this post


Link to post
Share on other sites

It is being created by your browser, since the code uses the HTML 5 'required' attribute.

M


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites
I am testing on two languages, english and portuguese.
When switching the language on the language boxe the error message should change.
In this case I have to change the required title to "Por favor, preencha este campo."
Is it?
 
 
 
61 down vote accepted

setCustomValidity's purpose is not just to set the validation message, it itself marks the field as invalid. It allows you to write custom validation checks which aren't natively supported.

You have two possible ways to set a custom message, an easy one that does not involve Javascript and one that does.

The easiest way is to simply use the title attribute on the input element - its content is displayed together with the standard browser message.

<input type="text" required title="Lütfen işaretli yerleri doldurunuz" />

enter image description here

If you want only your custom message to be displayed, a bit of Javascript is required. I have provided both examples for you in this fiddle.

Share this post


Link to post
Share on other sites

If this message is indeed coming from the browser itself, it will depend on the language that the browser is configured for. For most people, it will still be English, and messages will be in English. You can try some of the techniques in the referenced StackOverflow thread to add some PT text to the message. You may even be able to do some Javascript that replaces the English message with PT, but there's no guarantee that it will work on all browsers.

I'll assume that you've scanned through the English language text files to check whether this text is supplied by osCommerce. If it is, you should be able to come up with a PT language file equivalent, if it doesn't already exist.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×