Question

I've been trying to embed some hebrew characters in Thom Sander's free html5 template (download link).

For example, I've tried to change a left-side menu item text to Hebrew, i.e.,

Home Page => עמוד הבית

For some reason the hebrew characters are not shown at all.

When I add hebrew in other places in the document, it is shown correctly. At first I thought this may be an encoding issue but the head encoding seems to be valid: UTF-8. I think there might be some JS code ignoring the Hebrew text, but I'm not sure.

Any ideas?

Was it helpful?

Solution

Seems like someone already found a solution for that. I didn't try to implement the whole solution but tested it with your files and it works.

You can find the solution here

Basicaly you just need to use CufonRTL.js to be able to use Hebrew & Cufon.js together. You may find CufonRTL.js at the begining of the blog post or just download the file from here

Then you ll have to load CufonRTL.js and execute something like:

    CufonRTL.RTL('#menu a');

So the menu links would support Hebrew while using the Cufon library & custom font.

OTHER TIPS

The reason you cannot embed Hebrew characters into your website is beacuse the template is using the cufon technique, which doesn't support right to left languages.

Planned features:

  • Support for right-to-left and bi-directional text

However, it looks like there is a way around it:

Using Cufon with Right-To-Left Text

Try adding this rule to the CSS

html { unicode-bidi: embed;  }

http://www.w3schools.com/jsref/prop_style_unicodebidi.asp

The unicodeBidi property is used with the direction property to set or return whether the text should be overridden to support multiple languages in the same document.

Be sure to use:

<meta http-equiv='Content-Type' content='Type=text/html; charset=utf-8'>

Or (as a new HTML5 standard):

<meta charset='utf-8'> 

And try adding this property in your CSS:

unicode-bidi: embed;

You can also try to display something, using HTML Entities instead of Unicode characters: &#1425; &#1426; #1427;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top