2008年3月21日
覚え書き
- Blogプラグインにより表示される「Readmore…」メッセージを日本語化(「続きを読む」)にしようと、
/lib/plugins/blog/lang
配下のフォルダ“en”を“ja”という名前にコピーし、lang.php, settings.php
をそれぞれ修正したが、日本語で表示されない。
行頭の+は追加行、-は削除行です。
<?php /** - * English language file + * Japanese language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Esther Brunner <wikidesign@gmail.com> */ // custom language strings for the plugin $lang['blog'] = 'Blog'; -$lang['older'] = 'Older entries'; -$lang['newer'] = 'Newer entries'; -$lang['newentry'] = 'New blog entry:'; +$lang['older'] = '古い記事'; +$lang['newer'] = '新しい記事'; +$lang['newentry'] = '新しい記事を投稿:'; +$lang['readmore'] = '続きを読む'; //Setup VIM: ex: et ts=2 enc=utf-8 :
/lib/plugins/blog/inc/include.php
では確かに、lang['readmore']
を呼んでいるんだがなぁ・・・。
因みに、/conf/local.php
に $lang['readmore'] = '続きを読む';
を書き入れてもやはり「Readmore…」のまま。:tear:
function _readMore(){ $last = $this->ins[count($this->ins) - 1]; if ($last[0] == 'section_close') $this->ins = array_slice($this->ins, 0, -1); $this->ins[] = array('p_open', array(), $last[2]); $this->ins[] = array('internallink', array($this->page['id'], $this->getLang('readmore')), $last[2]); $this->ins[] = array('p_close', array(), $last[2]); if ($last[0] == 'section_close') $this->ins[] = $last; return $this->ins; }