二、VB.NET 多语言版本的开发之XML

DefaultLanguage.xml
<? xml version="1.0" standalone="yes" ?>
< Language >
  
< DefaultLanguage > ZH </ DefaultLanguage >
</ Language >
AppConfig.xml
<? xml version="1.0" encoding="utf-8"  ?>
< AppConfig >
    
< Area >
        
< Language > ZH </ Language >
        
< List >
            
< Item > 简体中文[ZH] </ Item >
            
< Item > 繁体中文[UN] </ Item >
            
< Item > 英文[EN] </ Item >
        
</ List >
    
</ Area >
    
< Area >
        
< Language > UN </ Language >
        
< List >
            
< Item > 簡體中文[ZH] </ Item >
            
< Item > 繁體中文[UN] </ Item >
            
< Item > 英文[EN] </ Item >
        
</ List >
    
</ Area >
    
< Area >
        
< Language > EN </ Language >
        
< List >
            
< Item > Simplified[ZH] </ Item >
            
< Item > Traditional[UN] </ Item >
            
< Item > EngLish[EN] </ Item >
        
</ List >
    
</ Area >
</ AppConfig >
AppResource_EN.xml

<? xml version="1.0" encoding="utf-8"  ?>
< Resource >
    
< Form >
        
< Name > Frmlogin </ Name >
        
< Controls >
            
< Control  name ="frmlogin"  text ="User logon"   />
            
< Control  name ="lblusername"  text ="Username:"   />
            
< Control  name ="lblpassword"  text ="Password:"   />
            
< Control  name ="lbllanguage"  text ="Language:"   />
            
< Control  name ="btnlogon"  text ="Logon"   />
            
< Control  name ="btncancel"  text ="Exit"   />
            
< Control  name ="btnchagepwd"  text ="Change Password"   />
            
< Control  name ="llblSetLanguageDefine"  text ="Click setup default language" ></ Control >
        
</ Controls >
    
</ Form >
    
< Form >
        
< Name > FrmPasswordChages </ Name >
        
< Controls >
            
< Control  name ="frmpasswordchages"  text ="Change password"   />
            
< Control  name ="lblusername"  text ="Username:"   />
            
< Control  name ="lblpassword"  text ="Old Password:"   />
            
< Control  name ="lblnewpassword"  text ="New Password:"   />
            
< Control  name ="lblpasswordconfirm"  text ="Password Confirm:"   />
            
< Control  name ="btnok"  text ="OK"   />
            
< Control  name ="btncancel"  text ="Return"   />
        
</ Controls >
    
</ Form >
    
< Form >
        
< Name > FrmSetLanguage </ Name >
        
< Controls >
            
< Control  name ="FrmSetLanguage"  text ="Set LanguageOption" ></ Control >
            
< Control  name ="btnOK"  text ="OK" ></ Control >
            
< Control  name ="BtnExit"  text ="Exit" ></ Control >
            
< Control  name ="lblSetinfo"  text ="information" ></ Control >
            
< Control  name ="lblSet"  text ="is your default language." ></ Control >
            
< Control  name ="lblOKinfo"  text ="Warning" ></ Control >
            
< Control  name ="lblOK"  text ="been set up.  It will be effective after exiting the current application." ></ Control >
        
</ Controls >
    
</ Form >
</ Resource >

 AppResource_ZH.XMl

<? xml version="1.0" encoding="utf-8"  ?>
< Resource >
    
< Form >
        
< Name > Frmlogin </ Name >
        
< Controls >
            
< Control  name ="frmlogin"  text ="用户登陆"   />
            
< Control  name ="lblusername"  text ="用户名:"   />
            
< Control  name ="lblpassword"  text ="密码:"   />
            
< Control  name ="lbllanguage"  text ="语言:"   />
            
< Control  name ="btnlogon"  text ="登陆"   />
            
< Control  name ="btncancel"  text ="退出"   />
            
< Control  name ="btnchagepwd"  text ="更改密码"   />
            
< Control  name ="llblSetLanguageDefine"  text ="单击设置默认语言" ></ Control >
        
</ Controls >
    
</ Form >
    
< Form >
        
< Name > FrmPasswordChages </ Name >
        
< Controls >
            
< Control  name ="frmpasswordchages"  text ="更改密码"   />
            
< Control  name ="lblusername"  text ="用户名:"   />
            
< Control  name ="lblpassword"  text ="旧密码:"   />
            
< Control  name ="lblnewpassword"  text ="新密码:"   />
            
< Control  name ="lblpasswordconfirm"  text ="确认密码:"   />
            
< Control  name ="btnok"  text ="确定"   />
            
< Control  name ="btncancel"  text ="返回"   />
        
</ Controls >
    
</ Form >
    
< Form >
        
< Name > FrmSetLanguage </ Name >
        
< Controls >
            
< Control  name ="FrmSetLanguage"  text ="设置默认语言" ></ Control >
            
< Control  name ="btnOK"  text ="确定" ></ Control >
            
< Control  name ="BtnExit"  text ="返回" ></ Control >
            
< Control  name ="lblSetinfo"  text ="提示" ></ Control >
            
< Control  name ="lblSet"  text ="是您设置的默认语言" ></ Control >
            
< Control  name ="lblOKinfo"  text ="警告" ></ Control >
            
< Control  name ="lblOK"  text ="当前语言设置成功并且应用程序将退出生效" ></ Control >
        
</ Controls >
    
</ Form >
</ Resource >
  AppResource_UN.XMl
<? xml version="1.0" encoding="utf-8"  ?>
< Resource >
    
< Form >
        
< Name > Frmlogin </ Name >
        
< Controls >
            
< Control  name ="frmlogin"  text ="用戶登陸"   />
            
< Control  name ="lblusername"  text ="用戶名:"   />
            
< Control  name ="lblpassword"  text ="密  碼:"   />
            
< Control  name ="lbllanguage"  text ="語  言:"   />
            
< Control  name ="btnlogon"  text ="登陸"   />
            
< Control  name ="btncancel"  text ="退出"   />
            
< Control  name ="btnchagepwd"  text ="更改密碼"   />
            
< Control  name ="llblSetLanguageDefine"  text ="單擊設置默認語言" ></ Control >
        
</ Controls >
    
</ Form >
    
< Form >
        
< Name > FrmPasswordChages </ Name >
        
< Controls >
            
< Control  name ="frmpasswordchages"  text ="更改密碼"   />
            
< Control  name ="lblusername"  text ="用戶名:"   />
            
< Control  name ="lblpassword"  text ="舊密碼:"   />
            
< Control  name ="lblnewpassword"  text ="新密碼:"   />
            
< Control  name ="lblpasswordconfirm"  text ="確認密碼:"   />
            
< Control  name ="btnok"  text ="確定"   />
            
< Control  name ="btncancel"  text ="返回"   />
        
</ Controls >
    
</ Form >
    
< Form >
        
< Name > FrmSetLanguage </ Name >
        
< Controls >
            
< Control  name ="FrmSetLanguage"  text ="設置默認語言" ></ Control >
            
< Control  name ="btnOK"  text ="確定" ></ Control >
            
< Control  name ="BtnExit"  text ="返回" ></ Control >
            
< Control  name ="lblSetinfo"  text ="提示" ></ Control >
            
< Control  name ="lblSet"  text ="是您設置的默認語言" ></ Control >
            
< Control  name ="lblOKinfo"  text ="警告" ></ Control >
            
< Control  name ="lblOK"  text ="當前語言設置成功並且應用程式將退出生效" ></ Control >
        
</ Controls >
    
</ Form >
</ Resource >
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值