知乎专栏 |
这种方式流行于PHP语言,下面是一个例子
数据库方式包括
其他非关系型收据库 (Berkeley DB)
对象/关系型收据库 ORDBMS (mysql)
Berkeley DB 是一个不错的选择,而且相对关系型数据库比较有优势。因为关系型数据库子并发数有限,连接资源很宝贵。
例 11.2. sql table language package
select id,key,value from language where country = 'zh-cn' and key = 'hello_world';
The gettext functions implement an NLS (Native Language Support) API which can be used to internationalize your PHP applications. Please see the gettext documentation for your system for a thorough explanation of these functions or view the docs at » http://www.gnu.org/software/gettext/manual/gettext.html.