<< pLog class function的暫時更新 | Plog.HomePage | 加入 $blogtemplate 的變數,在模版設定上 >>
此方法只是暫時性的, Reic 試過後並不理想,只是暫時補足 zh 與 zh-TW 的字型不足。但是只要每次 pLog 有更新時,就得要從做一次。
修改方式:
尋找 class/locale/locale.class.php 中
將
function getLanguageId()
{
return substr( $this->_code, 0, 2 );
}
修改為
function getLanguageId()
{
return substr( $this->_code, 0, 5 );
}
由 老貓 所提供。
pLog安裝完成以後,預設的中文字型實在滿醜的,我試過許多方式都無效,即使在CSS檔中指定使用視窗的新細明體也沒用。我後來是在template檔中另外指定font字型為新細明才能成功,不過那得在每個地方都指定才行,迴響不指定,字型就還是舊的。
然後剛剛我實驗了Mark說的方法,在header.template檔頭,把
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$locale->getLanguageId()}"
lang="{$locale->getLanguageId()}" dir="{$locale->getDirection()}">
改成
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang=zh-TW
lang=zh-TW dir="{$locale->getDirection()}">
然後網誌所有使用中文字的地方,就全部變成漂亮的新細明了。這個做法對IE有效,但我不確定對其他瀏覽器有沒有作用。
<< pLog class function的暫時更新 | Plog.HomePage | 加入 $blogtemplate 的變數,在模版設定上 >>