开发者

Xml multiple documents

开发者 https://www.devze.com 2023-02-10 06:42 出处:网络
ive got an assignment which req开发者_运维知识库uires me to set default language to a win from app. using an xml file

ive got an assignment which req开发者_运维知识库uires me to set default language to a win from app. using an xml file NOW THAT'S NO PROBLEM "

<languages>
<language id="english" mark="">
<control id="ctrl1">Button_One</control>
<control id="ctrl2">Button_Tow</control>
<control id="ctrl3">Button_Three</control>
<control id="ctrl4">Button_Four</control>
</language>
<language id="hebrew" mark="defualt">
<control id="ctrl1">כפתור_אחד</control>
<control id="ctrl2">כפתור_שני</control>
<control id="ctrl3">כפתור_שלישי</control>
<control id="ctrl4">כפתור_רביעי</control>
</language>
<language id="spanish" mark="">
<control id="ctrl1">botón uno</control>
<control id="ctrl2">botón también</control>
<control id="ctrl3">botón tres</control>
<control id="ctrl4">botón cuatro</control>
</language>
</languages>

the assignment also stated that we may use several xml files , one for each language , my question is : what could be the advantage of doing this in that manner ,and not in one file as i have ?


Having a separate file for each language may make it easier to maintain since you don't have to search the file for the language. It's also less memory since you're not loading unnecessary languages.

0

精彩评论

暂无评论...
验证码 换一张
取 消