Reputation: 22591
Can you make a confirm
or alert
show its message RTL and right-aligned?
Upvotes: 3
Views: 2368
Reputation: 2309
If you have control over the <html>
tag, set direction to RTL like this <html dir="rtl">
You may also do it with javascript as shown below:
document.getElementsByTagName("html")[0].setAttribute("dir","rtl");
Upvotes: 0
Reputation: 92
Try adding this at the beginning of your message: "\u200f\u200f"
for example:
alert("\u200f\u200f"+ message);
or
confirm("\u200f\u200f"+ message);
Upvotes: 7
Reputation: 630579
Programmatically no, but the user's culture setting for their machine should determine which way it's presented, at least in all current browsers. I'm not aware of a comprehensive "who supports it" list though.
Upvotes: 5