I need help with confirm() funciton.

N

News

I need help with confirm() funciton.

I have an application that displays pages in English and French languages.

What I need is to display buttons upon clicking confirm(), buttons for
English obviously Ok and Cancel, for French users Ok and Annuler.

Is it possible?

Thanks,

Gene
 
V

VK

News said:
I need help with confirm() funciton.

I have an application that displays pages in English and French languages.

What I need is to display buttons upon clicking confirm(), buttons for
English obviously Ok and Cancel, for French users Ok and Annuler.

You can't - with window.confirm. The only option is to write your own
DHTML dialog. But in a multilingual UA the button labels depend on
chosen installation language, say in English IE it will be OK / Cancel,
in French IE OK / Annuler - without your intervention.

Naturally it is possible to have a French visitor using English browser
version - but nothing you can do, again besides writing your own DHTML
widget or taking a ready one.

Actually a real problem not with button labels, but with the dialog
message itself. While "OK" is mainly OK everywhere :), what about
Cancel?

"To stop transaction please press..." Cancel? Annuler? Abbrechen?
I mean you can translate the start, but what to place at the end? Gives
me a headache every time I need to make some multilanguage project.

It would be *really* nice IMHO to have some predefined global string
constants like OK_Label or CANCEL_Label to simply insert them into
messages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top