var arrLang = {
    "zh": {
        "我的": "我的",
        "账号": "账号",
        "切换账号": "切换账号",
        "修改密码": "修改密码",
        "立即绑定": "立即绑定",
        "立刻绑定": "立刻绑定",
        "订单":"订单",
        "查看订单":"查看订单",
        "绑定手机":"绑定手机",
        "已经绑定":"已经绑定",
        "点击绑定":"点击绑定",
        "用户中心":"用户中心",
        "客服中心":"客服中心",
        "恭喜您":"恭喜您",
        "密码修改成功":"密码修改成功",
        "其他":"其它",
        "隐私协议":"隐私协议",
        "注册协议":"注册协议",
        "获取验证码":"获取验证码",
        "确定":"确定",
        "联系客服":"联系客服",
        "手机格式不正确":"手机格式不正确",
        "重新获取":"重新获取",
        "新密码格式不正确":"新密码格式不正确",
        "订单详情":"订单详情",
        "读取中...":"读取中...",
        "下拉获取更多订单信息":"下拉获取更多订单信息",
        "未查询到订单记录":"未查询到订单记录",
        "工作时间: 8:30 -- 17:30":"工作时间: 8:30 -- 17:30",
        "原密码":"原密码",
        "新密码":"新密码",

        "无效订单":"无效订单",
        "待付款":"待付款",
        "支付成功":"支付成功",
        "发货成功":"发货成功",
        "等待发货":"等待发货",
        "支付失败":"支付失败",
        "发货失败":"发货失败",
		"注销账号":"注销账号",
		"content":"如果您删除账号，您将无法登录，您的信息将会被删除。",
		"hint":"您是否确定删除账号？",
		"title":"警告",
		"affirm":"确认",
		"cancel":"取消"
		
    },
    "hk": {//繁体
        "我的": "我的",
        "账号": "帳號",
        "切换账号": "切換帳號",
        "修改密码": "修改密碼",
        "立即绑定": "立即綁定",
        "立刻绑定": "立即綁定",
        "订单":"訂單",
        "查看订单":"查看訂單",
        "绑定手机":"綁定手機",
        "已经绑定":"已經綁定",
        "点击绑定":"點擊綁定",
        "用户中心":"用戶中心",
        "客服中心":"客服中心",
        "恭喜您":"恭喜您",
        "密码修改成功":"密碼修改成功",
        "其他":"其他",
        "隐私协议":"隱私協定",
        "注册协议":"注册協定",
        "获取验证码":"獲取驗證碼",
        "确定":"確定",
        "联系客服":"聯系客服",
        "手机格式不正确":"手機格式不正確",
        "重新获取":"重新獲取",
        "新密码格式不正确":"新密碼格式不正確",
        "订单详情":"訂單詳情",
        "读取中...":"讀取中…",
        "下拉获取更多订单信息":"下拉獲取更多訂單資訊",
        "未查询到订单记录":"未査詢到訂單記錄",
        "工作时间: 8:30 -- 17:30":"工作時間：8:30 -- 17:30",
        "原密码":"原密碼",
        "新密码":"新密碼",

        "无效订单":"無效訂單",
        "待付款":"待付款",
        "支付成功":"支付成功",
        "发货成功":"發貨成功",
        "等待发货":"等待發貨",
        "支付失败":"支付失敗",
        "发货失败":"發貨失敗",
		"注销账号":"注銷賬號",
		"content":"如果你刪除賬號，你將無法登錄，你的信息將會被刪除。",
		"hint":"你是否刪除賬號？",
		"title":"警告",
		"affirm":"確認",
		"cancel":"取消"
    },
    "en": {
        "我的": "Me",
        "账号": "Account",
        "切换账号": "Switch Account",
        "修改密码": "Change Password",
        "立即绑定": "Bind Now",
        "立刻绑定": "Bind Now",
        "订单":"Order",
        "查看订单":"View Order",
        "绑定手机":"Bind Phone",
        "已经绑定":"Bound",
        "点击绑定":"Tap to Bind",
        "用户中心":"Customer Service",
        "客服中心":"User Center",
        "恭喜您":"Congratulations",
        "密码修改成功":"Password changed",
        "其他":"Others",
        "隐私协议":"Privacy Policy",
        "注册协议":"Registration Protocol",
        "获取验证码":"Get Verification Code",
        "确定":"Confirm",
        "联系客服":"Contact GM",
        "手机格式不正确":"Wrong phone number format",
        "重新获取":"Try Again",
        "新密码格式不正确":"Wrong format for the new password",
        "订单详情":"Order Details",
        "读取中...":"Reading…",
        "下拉获取更多订单信息":"Drag down to view more info",
        "未查询到订单记录":"Order record not found",
        "工作时间: 8:30 -- 17:30":"Working Hours: 8:30 - 17:30",
        "原密码":"old password",
        "新密码":"new password",

        "无效订单":"Invalid order",
        "待付款":"Pending",
        "支付成功":"Payment success",
        "发货成功":"Shipping successfully",
        "等待发货":"Waiting for shipment",
        "支付失败":"Failed payment",
        "发货失败":"Failed",
		"注销账号":"Delete Account",
		"content":"If you delete your account, you will not be able to log in again, and your data will be cleared.",
		"hint":"Are you sure to delete the account?",
		"title":"Warning",
		"affirm":"Yes",
		"cancel":"No"
    },
    "ja": {//日文
        "我的": "私の",
        "账号": "アカウント",
        "切换账号": "切り替え",
        "修改密码": "パスワード変更",
        "立即绑定": "連携する",
        "立刻绑定": "連携する",
        "订单":"注文",
        "查看订单":"注文確認",
        "绑定手机":"携帯を連携",
        "已经绑定":"連携済",
        "点击绑定":"連携する",
        "用户中心":"ﾕｰｻﾞｰｾﾝﾀｰ",
        "客服中心":"顧客サービス",
        "恭喜您":"おめでとう",
        "密码修改成功":"パスワード変更成功",
        "其他":"その他",
        "隐私协议":"ﾌﾟﾗｲﾊﾞｼｰﾎﾟﾘｼｰ",
        "注册协议":"利用規約",
        "获取验证码":"認証コードを取得",
        "确定":"確定",
        "联系客服":"お問合せ",
        "手机格式不正确":"携帯番号が正しくありません",
        "重新获取":"再度取得",
        "新密码格式不正确":"パスワードの形式が正しくありません",
        "订单详情":"注文詳細",
        "读取中...":"取得中…",
        "下拉获取更多订单信息":"スクロールしてもっと読み込む",
        "未查询到订单记录":"注文履歴が見つかりませんでした",
        "工作时间: 8:30 -- 17:30":"営業時間: 8:30 -- 17:30",
        "原密码":"以前のパスワード",
        "新密码":"新しいパスワード",

        "无效订单":"Invalid order",
        "待付款":"Pending",
        "支付成功":"Payment success",
        "发货成功":"Shipping successfully",
        "等待发货":"Waiting for shipment",
        "支付失败":"Failed payment",
        "发货失败":"Failed",
		"注销账号":"Delete Account",
		"content":"アカウントを削除すると、ログインできなくなり、情報が削除されます.",
		"hint":"アカウントを削除してもよろしいですか?",
		"title":"暖かい",
		"affirm":"確認",
		"cancel":"キャンセル"
    },
    "ko": {//韩文
        "我的": "내",
        "账号": "계정",
        "切换账号": "계정 전환",
        "修改密码": "비밀번호 변경",
        "立即绑定": "즉시 연동",
        "立刻绑定": "즉시 연동",
        "订单":"주문",
        "查看订单":"주문 보기",
        "绑定手机":"휴대전화 연동",
        "已经绑定":"연동 완료",
        "点击绑定":"터치해 연동",
        "用户中心":"사용자 센터",
        "客服中心":"고객 서비스",
        "恭喜您":"축하드려요",
        "密码修改成功":"비밀번호 변경 완료",
        "其他":"기타",
        "隐私协议":"개인정보 보호정책",
        "注册协议":"사용자 약관",
        "获取验证码":"인증코드 획득",
        "确定":"확인",
        "联系客服":"고객센터 연락",
        "手机格式不正确":"전화번호 형식 오류",
        "重新获取":"재획득",
        "新密码格式不正确":"신규 비밀번호 형식 오류",
        "订单详情":"주문 상세",
        "读取中...":"로딩 중…",
        "下拉获取更多订单信息":"아래로 끌어 더 많은 정보 보기",
        "未查询到订单记录":"주문 기록을 찾을 수 없음",
        "工作时间: 8:30 -- 17:30":"업무시간: 8:30~17:30",
        "原密码":"기존 비밀번호",
        "新密码":"새 비밀번호",

        "无效订单":"Invalid order",
        "待付款":"Pending",
        "支付成功":"Payment success",
        "发货成功":"Shipping successfully",
        "等待发货":"Waiting for shipment",
        "支付失败":"Failed payment",
        "发货失败":"Failed",
		"注销账号":"Delete Account",
		"content":"계정을 삭제하면 다시 로그인할 수 없으며 데이터가 삭제됩니다.",
		"hint":"계정을 삭제 하시겠습니까?",
		"title":"경고하다",
		"affirm":"확인하다",
		"cancel":"취소"
    },
};



export const lang = {
	lg:"en",
	hk:{
		product:"我們的產品",
		AboutUs:"關於我們",
		CompanyProfile:"公司簡介",
		paragraph1:"香港鳳起網絡科技有限公司成立於2017年，是壹家朝氣蓬勃、專註移動遊戲研發和發行新銳遊戲公司。自成立以來，我們堅持共同的遊戲夢想，以用戶體驗為導向，秉承創新理念，致力於創作真正好玩的遊戲。堅持以精品遊戲為玩家創造快樂，以創意給用戶帶來獨特的遊戲體驗，逐步形成了手機遊戲研發、發行壹體化的業務運營模式。經過兩年多的積累，公司擁有豐富的研發、市場資源，專註於為玩家打造最優質的遊戲產品。",
		paragraph2:"憑著專註、創意和對玩家負責的態度，鳳起網絡持續提升自身能力，在不斷變化的市場中，始終保持快速、穩健的發展。未來，鳳起將立足移動遊戲領域，制定全方位的發展戰略，深入內容領域，探索更多的可能，為每壹位有能力的妳提供壹個可以大展宏圖的平臺！",
		ContactWay:"聯係方式",
		PaymentAmount: "支付金額",
		PaymentDetails: "支付詳情",
		diamond:"鑽石",
		pay:"支付",
		OpenPayOptions:"打開支付選項"
	},
	en:{
		product:"OurProducts",
		AboutUs:"About Us",
		CompanyProfile:"Company Profile",
		paragraph1:"on mobile game development and release of cutting-edge games company. Since its inception, we adhere to the common dream of games, user experience as the guidance, adhering to the concept of innovation, committed to creating truly fun games. Insisting on creating happiness for players with high-quality games and bringing unique game experience to users with creativity, the company has gradually formed an integrated business operation mode of mobile game development and distribution. After more than two years of accumulation, the company has rich research and development, marketing resources, focus on creating the best quality game products for players.",
		paragraph2:"With a dedicated, creative and responsible attitude towards players, FengQI Network continues to improve its capabilities and maintain rapid and steady development in the ever-changing market. In THE FUTURE, FENGQI WILL BE based on THE field of mobile games, develop a comprehensive development strategy, go deep into the content field, explore more possibilities, and provide a platform for every capable person to make great achievements!",
		ContactWay:"Contact Way",
		PaymentAmount:"Payment Amount",
		PaymentDetails:"Payment Details",
		diamond:"Diamond",
		pay:"pay",
		OpenPayOptions:'Open Pay Options'
	}
}

// The default language is English


// Check for localStorage support
var _langCode = navigator.language;
console.log("language:"+_langCode);
var _langHead = _langCode.substring(0,2);
if(_langHead == 'zh'){
    if(_langCode == 'zh' || _langCode == 'zh-cn' || _langCode == 'zh-CN' ){
        lang.lg = 'zh';
    }else{
         lang.lg = 'hk';
    }
}else{
    lang.lg = _langHead;
}
if (!Object.keys(arrLang).includes( lang.lg))  lang.lg = 'en';

// lang = 'en'
console.log("当前语言:"+ lang.lg)


/**
 * 翻译字段
 * @param name
 * @returns {*}
 * @private
 */
function __getLangText(name) {
    return arrLang[lang][name]
}
// get/set the selected language
// $(".translate").click(function() {
//     var lang = $(this).attr("id");
//
//     // update localStorage key
//     if('localStorage' in window){
//         localStorage.setItem('lang', lang);
//         console.log( localStorage.getItem('lang') );
//     }
//
//     $(".lang").each(function(index, element) {
//         $(this).text(arrLang[lang][$(this).attr("key")]);
//     });
// });
