Oct 06

CakePHPのShellを作成するときに__()を通しても変換されなかったので、ちょっとメモ

app/vendors/shells/hogehoge.php

App::import('Core', 'L10n');
class HogehogeShell extends Shell {
  function startup() {
    $this->L10n = new L10n();
    $this->L10n->get('jpn');
  }

  function main() {
    print __('Hello World.', true);
  }
}

ってやれば大丈夫でした。

Get Adobe Flash playerPlugin by wpburn.com wordpress themes