Joomla!-开源天空

2008-10-08
首页 专栏热点 Joomla! 应用 Joomla文章内容插件的实例(四) 语言文件


Joomla文章内容插件的实例(四) 语言文件

E-mail

语言文件(INI文件)
为了国际化,最好使用语言文件,在需要显示文字串的地方,采用JText::_( 'string' )来显示


比如,以下的参数

<param name="mode" type="list" default="1" label="Mode" description="Select how the emails will be displayed">
   <option value="0">Nonlinkable Text</option>
   <option value="1">As linkable mailto address</option>
</param>

实际应该在语言文件中设置相应的字串:

MODE=Mode
SELECT HOW THE EMAILS WILL BE DISPLAYED=Select how the e-mails will be displayed
NONLINKABLE TEXT=Nonlinkable text
AS LINKABLE MAILTO ADDRESS=As linkable mailto addressThe file looks repetitive, but will be very useful for translaters.

相关文章:
如何使用Joomla用户事件的插件系统
重写了yvcomment的插件,并增加了评分功能
Joomla文章内容插件的实例(五) 其他参考
Joomla文章内容插件的实例(三)调用模块内容的插件
Joomla文章内容插件的实例(二) 文章投票的插件
Joomla 文章内容插件的实例 (一) XML文件
Joomla的yvcomment评论插件的实现方式分析
如何在程序代码中使用插件
创建Joomla 1.5 的认证插件教程 下
创建Joomla 1.5 的认证插件教程 上


收藏此文章:
Digg! Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!

发表您的文章评论

您的姓名 (昵称)
标题:
评分: 很差一般较好很好
评论:
验证码:
请输入验证码