本サイトは個人的なまとめサイトです。 記載内容に誤り等がありましたらご指摘ください。

no way to compare when less than two revisions

差分

このページの2つのバージョン間の差分を表示します。


log:2008:03:080321 [2013/12/20 17:53] (現在) – 作成 - 外部編集 127.0.0.1
行 1: 行 1:
 +**2008年3月21日**
 +
 +====== 覚え書き ======
 +
 +  * [[public:dokuwiki:plugin:blog|Blogプラグイン]]により表示される「Readmore...」メッセージを日本語化(「続きを読む」)にしようと、''/lib/plugins/blog/lang'' 配下のフォルダ"en"を"ja"という名前にコピーし、''lang.php, settings.php''をそれぞれ修正したが、日本語で表示されない。
 +
 +
 +行頭の+は追加行、-は削除行です。
 +
 +<code 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 :
 +</code>
 +
 +''/lib/plugins/blog/inc/include.php'' では確かに、''lang['readmore']''を呼んでいるんだがなぁ・・・。
 +因みに、''/conf/local.php'' に ''$lang['readmore'  = '続きを読む';''を書き入れてもやはり「Readmore...」のまま。:tear:
 +
 +
 +<code php>
 +  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;
 +  }
 +</code>
 +
 +
  

ログイン