const lang = localStorage.getItem('lang');
const langs = {
// Desktop sidebar & Home page
'Hot Slot Games': {
th: 'เกมใหม่มาแรง'
},
'Popular Games': {
th: 'เกมยอดนิยม'
},
'Home': {
th: 'บ้าน'
},
'Hot Games': {
th: 'เกมใหม่มาแรง',
text: true
},
'Slot Games': {
th: 'เกมส์สล็อต',
text: true
},
'Live Casino': {
th: 'คาสิโนสด',
text: true
},
'Fish Games': {
th: 'เกมส์ยิงปลา',
text: true
},
'Arcade Games': {
th: 'เกมส์อาเคด',
text: true
},
'Arcade Game': {
th: 'เกมส์อาเคด'
},
'Provider': {
th: 'ค่ายเกม',
text: true
},
'Providers': {
th: 'ค่ายเกม',
text: true
},
'Promotion': {
th: 'โปรโมชั่น'
},
'Log Out': {
th: 'ออกจากระบบ'
},
'More': {
th: 'ดูเพิ่มเติม',
},
'Share': {
th: 'แชร์',
text: true,
},
'Copy Link': {
th: 'คัดลอกลิงค์',
text: true,
},
// User popup menu
'Wallet': {
th: 'กระเป๋าตัง'
},
'Account': {
th: 'บัญชี'
},
'History': {
th: 'ประวัติ'
},
'Announcement': {
th: 'ประกาศ'
},
'Referral': {
th: 'การอ้างอิง'
},
'Live Support': {
th: 'ติดต่อแอดมิน',
text: true
},
// Game lobby page
'All': {
th: 'ทั้งหมด'
},
'New': {
th: 'ใหม่'
},
'Hot': {
th: 'ยอดนิยม'
},
// Register page
'* User Name': {
th: '* ชื่อผู้ใช้'
},
'* Email': {
th: '* อีเมล'
},
'* Phone Number': {
th: '* เบอร์โทรศัพท์'
},
'* Password': {
th: '* รหัสผ่าน'
},
'* Confirm Password': {
th: '* ยืนยันรหัสผ่าน'
},
'Referral Code': {
th: 'รหัสชวนเพื่อน'
},
'Member Recruited': {
th: 'สมาชิกทั้งหมด'
},
'Total Commission': {
th: 'ยอดรวมคอมมิชชั่น'
},
'Bank': {
th: 'ธนาคาร'
},
'Please select your bank account' : {
th: 'กรุณาเลือกบัญชีธนาคาร'
},
'Bank Account Number': {
th: 'เลขบัญชีธนาคาร'
},
'Bank Account Holder': {
th: 'ชื่อบัญชี'
},
'I have to attained 18 years old, and I hereby agree to Terms of Service and Privacy Policy' : {
th: 'ฉันอายุครบ 18 ปี และฉันยอมรับข้อกำหนดการสมัครสมาชิก'
},
'Register': {
th: 'สมัครสมาชิก'
},
// Forgot password popup
'Forget Password': {
th: 'ลืมรหัสผ่าน'
},
'FORGET PASSWORD': {
th: 'ลืมรหัสผ่าน'
},
'Email': {
th: 'อีเมล'
},
'Mobile': {
th: 'เบอร์โทรศัพท์'
},
'Enter your username': {
th: 'ชื่อผู้ใช้'
},
'Enter your email': {
th: 'กรุณากรอกอีเมลของคุณ'
},
'Enter your phone number': {
th: 'เบอร์โทรศัพท์'
},
// Promotion page
'Other Promotions': {
th: 'โปรโมชั่นอื่นๆ',
},
'See More': {
th: 'ดูเพิ่มเติม',
},
'Read More': {
th: 'อ่านเพิ่มเติม',
},
'Claim': {
th: 'เรียกร้อง',
},
// Referral page
'Total Downline': {
th: 'เครือข่ายทั้งหมด'
},
'Total Income': {
th: 'รายได้ทั้งหมด'
},
'Referral Link': {
th: 'ลิงค์ชวนเพื่อน'
},
'Copy': {
th: 'คัดลอก'
},
'Copied!': {
th: 'คัดลอกแล้ว!'
},
'Error!': {
th: 'ข้อผิดพลาด!'
},
'Referral Details': {
th: 'รายละเอียดชวนเพื่อน'
},
'Referral Incentive Summary': {
th: 'สรุปรายได้จากการชวนเพื่อน'
},
'Referral List': {
th: 'รายการชวนเพื่อน'
},
'Date': {
th: 'วันที่'
},
'Amount': {
th: 'จำนวน'
},
'Name': {
th: 'ชื่อ'
},
'Bonus Amount': {
th: 'จำนวนโบนัส'
},
'Winning': {
th: 'การชนะ'
},
'No.': {
th: 'เลขที่'
},
'Username': {
th: 'ชื่อผู้ใช้'
},
'Turnover': {
th: 'ยอดเทิร์น'
},
'Win/Lose': {
th: 'ชนะแพ้'
},
'Register Date': {
th: 'วันที่ลงทะเบียน'
},
'Last Login': {
th: 'เข้าสู่ระบบล่าสุด'
},
'First Depo Date': {
th: 'วันที่ฝากครั้งแรก'
},
'Last Depo Date': {
th: 'วันที่ฝากล่าสุด'
},
'Referral Commission': {
th: 'คอมมิชชั่นชวนเพื่อน'
},
'Total Member': {
th: 'สมาชิกทั้งหมด'
},
'Group': {
th: 'กลุ่ม'
},
'Turnover': {
th: 'ยอดเทิร์น'
},
'Winlose': {
th: 'ชนะแพ้'
},
'Commission
Rate (Level 1)': {
th: 'ระดับคอมมิชชั่น
(เลเวล1)'
},
'Total Commission
Amount': {
th: 'จำนวนคอมมิชชั่นทั้งหมด'
},
// Datatable
'Show _MENU_ Entries': {
th: 'แสดง _MENU_ รายการ'
},
'Showing _START_ to _END_ of _TOTAL_ entries': {
th: 'แสดง _START_ ถึง _END_ จาก _TOTAL_ รายการ'
},
'Showing 0 to 0 of 0 entries': {
th: 'แสดง 0 ถึง 0 จาก 0 รายการ'
},
'No data available in table': {
th: 'ไม่มีข้อมูลในตาราง'
},
'No matching records found': {
th: 'ไม่พบรายการที่ตรงกัน'
},
'Next': {
th: 'ถัดไป'
},
'Previous': {
th: 'ก่อนหน้า'
},
'Loading...': {
th: 'กำลังโหลด...'
},
// Profile page
'Profile': {
th: 'โปรไฟล์',
text: true,
},
'Change Password': {
th: 'เปลี่ยนรหัสผ่าน',
text: true,
},
'Mobile Phone Number': {
th: 'หมายเลขโทรศัพท์'
},
'Send': {
th: 'ส่งรหัส'
},
'Bank Account': {
th: 'จากบัญชี'
},
'Account Number': {
th: 'เลขบัญชี'
},
'Referral ID': {
th: 'ไอดีชวนเพื่อน'
},
// Profile change password page
'Current Password': {
th: 'รหัสผ่านเก่า'
},
'Set New Password': {
th: 'ตั้งรหัสผ่านใหม่'
},
'Confirm New Password': {
th: 'ยืนยันรหัสผ่านใหม่'
},
// History transaction & History bet pages
'Transaction': {
th: 'ธุรกรรม'
},
'Bet': {
th: 'การเดิมพัน'
},
'Date & Time': {
th: 'วันที่ & เวลา'
},
'Trans. ID': {
th: 'รหัสธุรกรรม'
},
'Type': {
th: 'ประเภท'
},
'Amount (THB)': {
th: 'จำนวน (บาท)'
},
'Status': {
th: 'สถานะ'
},
'Note': {
th: 'หมายเหตุ'
},
'Game': {
th: 'เกม'
},
'Total Bet (THB)': {
th: 'ยอดเดิมพันรวม (บาท)'
},
'Total Payment (THB)': {
th: 'ยอดจ่ายรวม (บาท)'
},
'Total W/L (THB)': {
th: 'ยอดชนะ/แพ้รวม (บาท)'
},
'Total:': {
th: 'ทั้งหมด:'
},
'Grand Total:': {
th: 'ผลรวมทั้งสิ้น:'
},
// Deposit & WD transaction menu
'Deposit': {
th: 'ฝาก',
text: true
},
'Withdraw': {
th: 'ถอน',
text: true
},
'Scan QR Code For Deposit': {
th: 'สแกน QR Code สำหรับการฝากเงิน'
},
'Automatic Transfer': {
th: 'โอนเงินอัตโนมัติ',
text: true
},
'Account Management': {
th: 'จัดการบัญชี'
},
// Deposit promptpay page
'Minimum amount for deposit is 10, please make transaction only with binded account.': {
th: 'จำนวนเงินขั้นต่ำสำหรับเติมเงินคือ 10 บาท โปรดทำธุรกรรมด้วยบัญชีที่ผูกเท่านั้น'
},
'Option': {
th: 'ตัวเลือก'
},
'Bank': {
th: 'ธนาคาร'
},
'QR': {
th: 'คิวอาร์'
},
'*Deposit period {0} - {1} THB': {
th: '*ระยะเวลาฝาก {0} - {1} บาท'
},
// Deposit bank page
'Please check the destination account before transferring.': {
th: 'กรุณาตรวจสอบบัญชีปลายทางก่อนโอน'
},
'The system will add money to your wallet 1 minute.': {
th: 'ระบบจะเพิ่มเงินเข้ากระเป๋าเงินของคุณภายใน 1 นาที'
},
'Confirm': {
th: 'ยืนยัน'
},
// Withdrawal page
'My Account' : {
th: 'บัญชีของฉัน'
},
'Bank Account Name' : {
th: 'ชื่อบัญชีธนาคาร'
},
'Available Amount (THB)' : {
th: 'จำนวนเงินที่มีอยู่ (บาท)'
},
'Withdraw Amount' : {
th: 'จำนวนที่ต้องการถอน'
},
// Withdrawal account management
'Name on Card' : {
th: 'ชื่อบนบัตร'
},
'Select Bank': {
th: 'เลือกธนาคาร'
},
'Please select a bank' : {
th: 'เลือกธนาคาร'
},
'Account Number' : {
th: 'เลขบัญชี'
},
// General
'Games' : {
th: 'เกม'
},
'Log in': {
th: 'ลงชื่อเข้าใช้'
},
'Login': {
th: 'ลงชื่อเข้าใช้'
},
'LOGIN': {
th: 'เข้าสู่ระบบ'
},
'Sign Up': {
th: 'สมัครสมาชิก'
},
'Remember Me': {
th: 'จำฉันไว้'
},
'Forgot Password?': {
th: 'ลืมรหัสผ่าน?'
},
'Submit': {
th: 'ส่ง'
},
'Register': {
th: 'ลงทะเบียน'
},
'REGISTER': {
th: 'ลงทะเบียน'
},
'Select Deposit': {
th: 'เลือกวิธีการฝาก'
},
'Balance': {
th: 'ยอดเงิน'
},
'OTP Code': {
th: 'รหัสยืนยันตัวตน'
},
'Get Code': {
th: 'รับโค๊ด',
text: true
},
'Select Promotion': {
th: 'เลือกโปรโมชั่น'
},
'Receipt': {
th: 'ใบเสร็จ'
},
// Validation message
'This field is required.': {
th: 'ฟิลด์นี้จำเป็นต้องระบุ'
},
'Please enter a valid email.': {
th: 'โปรดกรอกอีเมลที่ถูกต้อง'
},
'Confirm password must same with password': {
th: 'ยืนยันรหัสผ่านจะต้องเหมือนกับรหัสผ่าน'
},
'This field accept number only': {
th: 'ช่องนี้สามารถกรอกได้เพียงตัวเลขเท่านั้น'
},
'Please enter at least {0} character': {
th: 'กรุณากรอกอย่างน้อย {0} ตัวอักษร'
},
'Please enter at most {0} character': {
th: 'กรุณากรอกอย่างน้อย {0} ตัวอักษร'
},
'Please insert alphanumeric value only': {
th: 'กรุณากรอกเพียงตัวอักษรหรือตัวเลขเท่านั้น'
},
'File size less or equal to {0}MB': {
th: 'ขนาดไฟล์ต้องเล็กกว่า {0}MB'
},
// Alert messages
'Unknown error, Please contact our customer service': {
th: 'พบข้อผิดพลาด กรุณาติดต่อฝ่ายบริการลูกค้า'
},
'Please login first': {
th: 'ต้องลงชื่อเข้าใช้'
},
'Login failed!': {
th: 'ลงชื่อเข้าใช้ไม่สำเร็จ'
},
'Register Successful': {
th: 'ลงทะเบียนสำเร็จ'
},
'User not found.': {
th: 'ไม่พบชื่อผู้ใช้นี้'
},
'Mobile no is invalid, cannot duplicate.': {
th: 'เบอร์โทรศัพท์นี้ได้ใช้สมัครสมาชิกไปแล้ว'
},
'Email is invalid, cannot duplicate.': {
th: 'อีเมลนี้ได้ใช้สมัครสมาชิกไปแล้ว'
},
'User name is invalid, cannot duplicate.': {
th: 'ชื่อผู้ใช้นี้ได้ใช้สมัครสมาชิกไปแล้ว'
},
'Your request has error. Please contact system administrator.': {
th: 'คำขอนี้ผิดพลาด กรุณาติดต่อแอดมิน'
},
'Search date range can\'t not longer than 7 days': {
th: 'ช่วงวันที่ค้นหาต้องไม่เกิน 7 วัน'
},
'Something was wrong...': {
th: 'มีบางอย่างผิดปกติ...'
},
'must be mandatory.': {
th: 'จำเป็นต้องกรอก'
},
'Invalid username.': {
th: 'ชื่อผู้ใช้ไม่ถูกต้อง'
},
'Bank nama tidak valid': {
th: 'ชื่อธนาคารไม่ถูกต้อง'
},
'Open link?': {
th: 'เปิดลิงค์?'
},
// Game launcher
'Sorry, you cannot transfer credits to this game because you have taken the following promotion:': {
th: 'ขออภัย คุณไม่สามารถโอนเครดิตไปยังเกมนี้ได้เนื่องจากคุณได้เข้าร่วมโปรโมชั่นดังต่อไปนี้:'
},
'You can only transfer credits to the games below:': {
th: 'คุณสามารถโอนเครดิตไปยังเกมด้านล่างได้เท่านั้น:'
},
'Player has coupon in progress.': {
th: 'ผู้เล่นมีคูปองที่กำลังใช้งานอยู่:'
},
'Game is under maintenance currently.': {
th: 'เกมกำลังอยู่ในระหว่างการบำรุงรักษา'
},
'Continue to Game': {
th: 'เล่นเกมต่อ'
},
'Exit': {
th: 'ออก'
},
// Deposit message
'Send deposit amount {0}?': {
th: 'ส่งจำนวนเงินมัดจำ {0}?'
},
'Are you sure to withdraw {0}?': {
th: 'คุณแน่ใจหรือไม่ว่าจะถอน {0}?'
},
'The amount must be in multiples of {0}, the amount received is {1}': {
th: 'จำนวนเงินต้องเป็นทวีคูณของ {0} จำนวนเงินที่ได้รับคือ {1}'
},
'Turnover requirements will be added. Do you want to continue?': {
th: 'ข้อกำหนดในการหมุนเวียนจะถูกเพิ่มเข้าไป คุณต้องการดำเนินการต่อหรือไม่'
},
// Change password message
'Are you sure to change your password now?': {
th: 'คุณแน่ใจแล้วใช่ไหมที่จะเปลี่ยนรหัสผ่านของคุณตอนนี้?'
},
// Bank
'Kasikornbank': {
th: 'ธนาคารกสิกรไทย'
},
'Siam Commercial Bank': {
th: 'ธนาคารไทยพาณิชย์'
},
'TMBThanachart Bank': {
th: 'ธนาคารทหารไทยธนชาต'
},
'Bank of Ayudhya': {
th: 'ธนาคารกรุงศรีอยุธยา'
},
'Bangkok Bank': {
th: 'ธนาคารกรุงเทพ'
},
'Krungthai Bank': {
th: 'ธนาคารกรุงไทย'
},
'CIMB Thai Bank': {
th: 'ธนาคารซีไอเอ็มบีไทย'
},
'TISCO Bank': {
th: 'ธนาคารทิสโก้'
},
'United Overseas Bank': {
th: 'ธนาคารยูโอบี (ไทย)'
},
'Government Saving Bank': {
th: 'ธนาคารออมสิน'
},
'Government Housing Bank': {
th: 'ธนาคารอาคารสงเคราะห์'
},
'KIATNAKIN PHATRA BANK': {
th: 'ธนาคารเกียรตินาคินภัทร'
},
'Bank for Agriculture and Agricultural Cooperatives': {
th: 'ธนาคารเพื่อการเกษตรและสหกรณ์'
},
'Land and Houses Bank': {
th: 'ธนาคารแลนด์แอนด์เฮ้าส์'
},
'Standard Chartered Bank (SCBT)': {
th: 'ธนาคารสแตนดาร์ดชาร์เตอร์ด'
},
'Islamic Bank of Thailand (ISBT)': {
th: 'ธนาคารอิสลามแห่งประเทศไทย'
},
'Citibank (CITI)': {
th: 'ธนาคารซิตี้แบงค์'
},
// Swal
'Request failed: {0}': {
th: 'คำขอล้มเหลว: {0}'
},
'Yes': {
th: 'ใช่'
},
'Ok': {
th: 'ตกลง'
},
'No': {
th: 'เลขที่'
},
'Cancel': {
th: 'ยกเลิก'
},
'Bank Transfer: Min {0} | Max {1}': {
th: 'โอนผ่านธนาคาร: ต่ำสุด {0} | สูงสุด {1}'
},
'Pulsa: Min {0} | Max {1}': {
th: 'Pulsa: Min {0} | Max {1}'
},
'E-Money: Min {0} | Max {1}': {
th: 'อี-มันนี่: ต่ำสุด {0} | สูงสุด {1}'
},
'Could not find the game you were looking for, please try search others game.': {
th: 'ไม่พบเกมที่ท่านค้นหา กรุณค้นหาเกมอื่น'
},
'ps-holder': {
// Header part
'Phone Number': {
th: 'เบอร์โทรศัพท์'
},
'Password': {
th: 'รหัสผ่าน'
},
// Profile
'Email': {
th: 'อีเมล'
},
'Mobile phone number': {
th: 'หมายเลขโทรศัพท์'
},
'Verification code': {
th: 'รหัสยืนยัน'
},
'Bank account': {
th: 'จากบัญชี'
},
'Account holder': {
th: 'ชื่อบัญชี'
},
'Account number': {
th: 'เลขบัญชี'
},
'Referral ID': {
th: 'ไอดีชวนเพื่อน'
},
'Referral Code': {
th: 'รหัสชวนเพื่อน'
},
'Referral Link': {
th: 'ลิงค์ชวนเพื่อน'
},
// Profile change password page
'Please type current password': {
th: 'โปรดกรอกรหัสผ่านเก่า'
},
'Please type new password': {
th: 'โปรดกรอกรหัสผ่านใหม่'
},
'Please confirm new password': {
th: 'โปรดยืนยันรหัสผ่านใหม่'
},
// Game lobby
'Search': {
th: 'ค้นหา'
},
// Register page
'Enter your username': {
th: 'ชื่อผู้ใช้'
},
'Enter your email': {
th: 'กรุณากรอกอีเมลของคุณ'
},
'Enter your phone number': {
th: 'เบอร์โทรศัพท์'
},
'Enter your password': {
th: 'รหัสผ่าน'
},
'Confirm your password': {
th: 'ยืนยันรหัสผ่าน'
},
'Referral code (Optional)': {
th: 'รหัสชวนเพื่อน (ถ้ามี)'
},
'Please enter account number': {
th: 'กรุณากรอกหมายเลขบัญชี'
},
'Please enter account holder': {
th: 'กรอกชื่อและนามสกุล'
},
// Withdrawal page
'Please enter withdraw amount' : {
th: 'กรุณาระบุจำนวนเงินที่ต้องการถอน'
},
// Account management
'Please enter the full name of the card' : {
th: 'กรอกชื่อและนามสกุล'
},
'Please enter account number or phone number' : {
th: 'กรอกเบอร์โทรศัพท์'
},
},
}
function tr(text) {
let ts = langs[text], ts_ps = langs['ps-holder'][text];
text = (ts ? ts[lang] : (ts_ps ? ts_ps[lang] : undefined)) || text;
$.each(arguments, (i, arg) => {
if(i > 0) {
text = text.replace(`{${i-1}}`, arg);
}
});
return text;
}
function translate(el) {
$.each(el.children(), function(i, ch) {
var child = $(ch),
trans = tr(child.html().trim().replace(/\s+/g, ' ')),
psh = child.is('input') ? langs['ps-holder'][child.attr('placeholder')] : undefined;
if (psh != undefined && psh[lang] != undefined) {
child.attr('placeholder', psh[lang]);
}
if (child.html().trim().replace(/\s+/g, ' ') != trans) {
child.html(trans);
}
if (child.children().length > 0) {
translate(child);
}
});
}
if (lang == 'th') {
$('body').addClass('th');
translate($('body'));
var trTexts = Object.fromEntries(Object.entries(langs).filter(([key, value]) => value.text != undefined))
for(l in trTexts) {
let lg = langs[l][lang];
if (lg != undefined) {
$.each($('.btn-breadcrumb, .title-page, .box .title, select option, button, a'), function(i, el) {
$(el).html($(el).html().replace(l, lg))
});
}
}
}