ale*_*nco 1 kohana internationalization
我一直在尝试让i18n工作:只显示一个包含2种不同语言的字符串.我按照本教程,但我认为作者没有使用Kohana 3.
它主要包括在pl.php文件i18n夹中创建langauge file()文件,并添加以下内容:
<?php
$translations['Good Morning'] = 'Magandang Umaga';
Run Code Online (Sandbox Code Playgroud)
然后将语言环境更改为pl.
最后是视图文件中的输出:
<?php echo __('Good Morning'); // would produce 'Good Morning' ?>
Run Code Online (Sandbox Code Playgroud)
我真的迷失在教程中.
谁能给我一个在Kohana v3.0.6.2中使用国际化(i18n)的小例子?
提前致谢!
这就是你的i18n/pl.php文件的样子:
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'Good Morning' => 'Magandang Umaga',
);
Run Code Online (Sandbox Code Playgroud)
你无法复制从ko2教程中看到的所有内容