flex 设置多国语言

1:as
package font.agd.agdlogin
{
public class agdLoginFonts
{
public function agdLoginFonts()
{
}
private var arr_cBClass_s:Array=[{label:"一般",key:"0"},{label:"加班",key:"1"}];
private var arr_cBClass_c:Array=[{label:"一般",key:"0"},{label:"加班",key:"1"}];
private var arr_cBClass_e:Array=[{label:"common",key:"0"},{label:"Overtime",key:"1"}];

private var arr_cBModel_s:Array=[{label:"InBound",key:"0"},{label:"Outbound",key:"1"}];
private var arr_cBModel_c:Array=[{label:"InBound",key:"0"},{label:"Outbound",key:"1"}];
private var arr_cBModel_e:Array=[{label:"InBound",key:"0"},{label:"Outbound",key:"1"}];

private var arr_cBEmail_s:Array=[{label:"Without E-mail",key:"0"},{label:"With E-mail",key:"1"},{label:"E-mail Only",key:"2"}];
private var arr_cBEmail_c:Array=[{label:"Without E-mail",key:"0"},{label:"With E-mail",key:"1"},{label:"E-mail Only",key:"2"}];
private var arr_cBEmail_e:Array=[{label:"Without E-mail",key:"0"},{label:"With E-mail",key:"1"},{label:"E-mail Only",key:"2"}];

   private var fontarray:Array=
[
{
LdapId:"LDAP 账号",LdapPw:" LDAP 密码 ",Class:"班别",Model:"模式",EmailFun:"Email 功能",submist:"确认",cancel:"取消",login:"登入",
CBClass:arr_cBClass_s,CBModel:arr_cBModel_s,CBEmail:arr_cBEmail_s
},
{
LdapId:"LDAP 賬號",LdapPw:"LDAP 密碼",Class:"班別 ",Model:"模式",EmailFun:"Email 功能",submist:"確認",cancel:"取消",login:"登入",
CBClass:arr_cBClass_c,CBModel:arr_cBModel_c,CBEmail:arr_cBEmail_c
},
{
LdapId:"LDAP Account",LdapPw:"LDAP PassWord",Class:"Common/OT",Model:"IB/OB",EmailFun:"Email ",submist:"login",cancel:"Cancel",
CBClass:arr_cBClass_e,CBModel:arr_cBModel_e,CBEmail:arr_cBEmail_e
},
{
LdapId:"LDAP ID",LdapPw:"LDAP Password",Class:"班別",Model:"模式",EmailFun:"Email 功能",submist:"OK",cancel:"Cancel",login:"登入",
CBClass:arr_cBClass_c,CBModel:arr_cBModel_c,CBEmail:arr_cBEmail_e
}
        ];

public function getFont(index:int):Object
{
return fontarray[index];
}

}
}

2:application 中

            private function init():void
            {
          //  var getLag:int=int(CTISharedObjectManager.getData("language"));//获取缓存数据
setlag(0);
//setlag(getLag);
           
        }
public var font_this:taskList=new taskList();
[Bindable]
public var font_tesklist:Object=new Object();
public function setlag(index:int):void//被外部的swf调用
{
font_tesklist=font_this.getFont(index);
}
           

你可能感兴趣的:(C++,c,Flex,C#)