How to make javascript for font sizes fully language dependent? -


I have a multilingual weblist with English and Arabic. Javascript for Fontsis is not included in css.

Different fontesize in both languages ​​is 16 and 12. When English to Arabic is displayed as large as English letters (like date and baggage), and when Arabic letters are very small when switching from English to Arabic. I would really like to make this JavaScript fully dependent on the language so that the English version can be shown in Arabic version, in the same version as the English version and for Arabic.

  & lt; Script type = "text / javascript" & gt; & Lt ;! - & lt; {$ Xoops_js} & gt; // -> Function set style (tag) {var element = document. GetElementsByTagName (tag); For (var i = 0; i & lt; elements.length; i ++) {var element = element [i] element.style.fontWight = 'bold'; Element.style.fontSize = '[en] 12 [/ en] [R] 16 [/ R] PX'; If (element.className == "nochange") {element.style.direction = "ltr"; } And {element.style.direction = "[en] ltr [/ en] [ar] rtl [/ ar]"; }} & Lt; / Script & gt;  

The following script is included in the theme's current JavaScript. I really appreciate it if someone can help me with this problem. My knowledge of JavaScript is to be honestly zero.

Thanks

TOONOID


Thank you for your reply.

Definitely be different because the size of 16 is correct in the Arabic version, but this is a big way in the English version.

When you change the Arabic language from Arabic to horizontally in Arabic and there are still some English characters or words in Arabic version I know something about Java but I would like to get my way into CSS Find me Of course, I have tried to create CSS files for both of them, but they have given me lots of errors so that this Javascript in the theme will be the easiest option. I hope that I have clarified my problem

What's happening here is styling through different javascript With page You do not need JavaScript in different font styles! Normally you do this with stylesheets. If you develop a web app and do not know stylesheets and javascript, then you are out of luck - luck.

I suggest: If you want the same font size for both languages, then just replace any integer in the given JS function as simple as "16" for "12" .


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -