CodeIgniter:语言文件编辑器?
我正在寻找一种好方法来创建一个 http 编辑器来管理 CI 语言文件...(对于定制的 CMS)
我发现了以下项目,但它有点旧且有问题: http://www.mrkirkland.com/codeigniter-language-file-translator/ 也不支持添加新的语言文件和语言密钥...
/// 我正在考虑一种新方法,通过混合 mysql 和 CI 语言文件来更轻松地管理 CI 语言...
mysql 表中将有两个表(lang /翻译)和一个用于 http gui 的控制器...
每个当编辑完成她/他的翻译工作时,她/她将单击“完成”按钮,它将
以这种方式输出不同语言的 CI 语言文件(但每种语言在同一个文件中) 我们正在使用本机 CI 语言系统(速度很快) )和翻译的管理/搜索/编辑是比直接编辑 CI 语言文件容易得多...而且也更安全...
示例:
TABLE : langs =
lang_id ---- lang_name
1---- 英语
2 --- 德语
表:翻译=
key --- lang_id --- 翻译
你好 --- 1 --- 你好
你好 --- 2 ---你好
输出将是这些文件
/application/language/english/global_lang.php
$lang['你好'] = '你好';
/application/language/german/global_lang.php
$lang['hello'] = 'hello';
你的意见是什么?值得这样做吗?
I am looking to find a good way to create an http editor to manage CI language files ... ( for a custom made CMS )
I found following project but its a bit old and buggy :
http://www.mrkirkland.com/codeigniter-language-file-translator/
also it doesnt support of adding new language file and language key...
///
I am thinking of a new way for making it much easier to manage CI languages with mixing mysql and CI language files ...
there will be two tables ( lang / translations ) in the mysql table and a controller for http gui...
each time the editor finished her/his translation job her/she will click on Finish button and it will output CI language files in different languages ( but each language in a same file )
with this way We are using native CI Language system (which is fast) and managing/searching/editing of translations are much easier than directly editing CI Language files ... also its much secure ...
example :
TABLE : langs =
lang_id ---- lang_name
1---- English
2 --- German
TABLE : translations=
key --- lang_id --- translation
hello --- 1 --- hello
hello --- 2 ---hallo
and the output will be these files
/application/language/english/global_lang.php
$lang['hello'] = 'hello';
/application/language/german/global_lang.php
$lang['hello'] = 'hallo';
what is your opinion ? does it worth to do this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现了这个:
http://blog.codebusters.pl/en /entry/codeigniter-frontend-language-files-editor
希望这有帮助
:)
I found this:
http://blog.codebusters.pl/en/entry/codeigniter-frontend-language-files-editor
Hope this helps
:)
对于 php 语言文件编辑,我使用这个 Firefox 插件: https:// addons.mozilla.org/en-US/firefox/addon/phplangeditor/
很容易找到未翻译的字符串...
For php language file editing I'm using this Firefox addon: https://addons.mozilla.org/en-US/firefox/addon/phplangeditor/
It's easy to find untranslated strings...