二、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 >

你可能感兴趣的:(VS.NET/ASP.NET)