Elxis CMS Forum
Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on June 26, 2014, 13:02:43
-
Hi there,
am I doing something wrong - is there anything I can do to rectify this issue:
On the Burmese language version of an Elxis site, the font is imported thus:
html head:
<link rel="stylesheet" href='http://mmwebfonts.comquas.com/fonts/?font=zawgyi' />
css:
:lang(my) {
font-family : 'Zawgyi-One', serif;
}
This works perfectly for all text on the page but the meta tags are not encoded correctly - they appear as gibberish:
<title>ျမန္မာ့စီးပြားေရးက႑ တာ၀န္ယူမႈရွိေရး အေထာက္အကူျပဳဌာနအေၾကာင္း - Myanmar Centre for Responsible Business</title>
<meta name="description" content="ျမန္မာ့စီးပြားေရးက႑ တာ၀န္ယူမႈရွိေရး အေထာက္အကူျပဳဌာန သည္ ျမန္မာႏိုင္ငံတစ္၀ွမ္း တာ၀န္ယူမႈရွိေသာ စီးပြားေရးလုပ္ငန္းေဆာင္ရြက္မႈမ်ားကုိ အားေပးမည့္ အဖြဲ႕အစည္းသစ္တစ္ခုျဖစ္သည္။ IHRB ႏွင့္ DIHR တုိ႔ ပူးေပါင္းေဆာင္ရြက္မႈျဖင့္ ဖြဲ႕စည္းထားျခင္းျဖစ္သည္။ Myanmar Centre for Responsible Business" />
<meta name="keywords" content="ျမန္မာ၊ ဌာန၊ တာ၀န္ယူမႈရွိေသာ၊ စီးပြားေရးလုပ္ငန္း၊ ဗမာ၊ အင္စတီက်ဳ၊ လူ႔အခြင့္အေရး၊ ဒိန္းမတ္ အင္စတီက်ဳ၊ လူ႔အခြင့္အေရး၊ ihrb, dihr, ဗစ္ကီ ဘုိမန္၊ ပုဂၢၢၢလိက က႑၊ အစုိးရ၊ လမ္းညႊန္အေျခခံမူမ်ား၊ ကုလသမဂၢၢၢ။, ျမန္မာ့စီးပြားေရးက႑, တာ၀န္ယူမႈရွိေရး, အေထာက္အကူျပဳဌာနအေၾကာင္း" />
Is there a way to fix this problem?
These are the first lines of the page script:
<!DOCTYPE html>
<html lang="my" dir="ltr">
<head>
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-
The Burmese text I copied from the code actually appears much better in this post than it does in the code of the webpage itself - I copied and pasted. But looks like gibberish on the page title for example on the webpage: (title only translated on this page - appears correctly on page but not in title bar of browser):
http://www.myanmar-responsiblebusiness.org/my/about.html
-
You use and load Zawgyi-One font. This font is loaded after the head section and so doesn't apply to the text already sent to the browser (page title and meta data). You must have Zawgyi-One or Tharlon fonts installed to view title/meta data properly. I advise you to use a more generic font that it is most probably to be installed in visitors' computers as a fail over font. I don't know which fonts you should use for your language, sorry.
You can also try to load the font exactly after the <head> tag in your template's html, it might work.
<html<?php echo $eDoc->htmlAttributes(); ?>>
<head>
<link rel="stylesheet" href='http://mmwebfonts.comquas.com/fonts/?font=zawgyi' />
<?php $eDoc->showHead(); ?>
This problem can also be solved if you have Zawgyi-One or Tharlon font as default in your browser. But this will work only to those have one of these fonts as default.
-
Yes, seems like there are no fonts that come as standard system fonts that contain Burmese characters. There isn't even a Burmese language version of Windows. But! your second suggestion has worked! I moved the call for the font up to the first item in the head. It doesn't appear perfectly but the text in the title and description is now much better. Thanks!
-
The problem is that head data are rendered by the browser directly, without any CSS interference, and this is absolutely normal. If you dont have a font installed that support Burmese characters you will never see this information correctly. I advise you to use latin characters, sorry.