[wp-trac] [WordPress Trac] #15887: Capital letters for writing the word "Error"
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 12 06:50:39 UTC 2011
#15887: Capital letters for writing the word "Error"
------------------------------+-----------------------------
Reporter: doktorbro | Owner: markjaquith
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future Release
Component: Warnings/Notices | Version: 3.1
Severity: minor | Resolution:
Keywords: i18n has-patch |
------------------------------+-----------------------------
Comment (by doktorbro):
Let me show you my simple solution. Save the code beside as HTML file:
{{{
<!DOCTYPE html>
<html lang="my">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/>
<title>Error international</title>
<style type="text/css">
strong:lang(en) { font-weight: normal; text-transform:
uppercase; }
strong:lang(he) { font-weight: bold; }
strong:lang(my) { font-weight: normal; color: red; }
</style>
</head>
<body>
<div lang="en">
<p><strong>Error:</strong> English style is uppercase.</p>
</div>
<div lang="he">
<p><strong>Error:</strong> Hebrew style is bold.</p>
</div>
<div>
<p><strong>Error:</strong> My style is red.</p>
</div>
</body>
</html>
}}}
As you can see in Firefox and Chrome, the attribute ''lang'' controls the
style of the element ''strong''. Note the line 2 where I define the
language of the whole document. That affects my red error style only.
Now we have to do 3 things:
1. Use CSS element ''strong'' to mark important words, like “Error” or
“Warning”.
2. Define CSS depending on language of the document.
3. Make sure display procedures are ready for CSS.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15887#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list