使用.xml文件进行语言更改 [英] using .xml file for language change
本文介绍了使用.xml文件进行语言更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表单。我需要这个表单字段标签以3-4种语言显示。我在.xml文件中有不同语言的相应标签。我不知道如何进行转换。表单现在是html rite。任何有关如何执行此操作的帮助!
解决方案
您必须通过过滤器从XML获取标签。但这取决于文件的结构,HTML等在不知道代码的情况下不能说更多。
展开 | 选择 | Wrap | 行号
也许你最好使用.ini文件=> parse_ini_file()。使用更少的内存。然后你应该把所有标签都放在一个数组中,你可以在那里打印。
我会做类似的事情。
展开 | 选择 | Wrap | 行号< /跨度>
I have a form .i need this form field labels to be displayed in 3-4 languages . i have the corresponding labels in different languages in a .xml file . i dono how to do the conversions. form is in html rite now. any help on how to do this!
解决方案you have to get the labels from the XML through a filter. but that depends on the structure of the file, the HTML etc. can?t say more without knowing the code.
Expand|Select|Wrap|Line Numbers
maybe you’re better off using an .ini file => parse_ini_file(). uses far less memory. then you should’ve got all labels in an array, where you can print from.
I’d do something like.
Expand|Select|Wrap|Line Numbers
这篇关于使用.xml文件进行语言更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆