waaaa 发表于 2024-3-28 23:32:33

翻译

本帖最后由 waaaa 于 2024-3-28 23:33 编辑

local Translations = {
    error = {
      delete_failed = "Failed to delete card",
      no_debitcard = "You do not have a debit card to pay with, please visit a branch to order a card. or ensure one is on your person.",
      failed = "Failed!",
      bank_closed = "The bank is currently closed",
      cant_apply = "You cannot apply for more loans",
      no_own_transfer = "You cannot transfer to your own account",
      under_maintenance = "The Bank is Under Maintenance Please try after some time!",
      nomore_societies = "Can't create more societies",
      player_limit = "Player max societies limit reached",
      player_offline = "Player not available",
      player_already_added = "Player already added",
      owner_remove = "Cannot remove society owner",
      invalid_plan = "Invalid Plan",
      loan_rejected = "Loan application rejected",
      not_enough = "You don\'t have this amount.",
      not_own_society ="You do not own this society",
      society_removed ="Society Removed Successfully",
      cannot_addmember = "You cannot add members",
      cannot_removemember = "You cannot remove members",
      cannot_crateplan = "You cannot create loan plan",
      cannot_removeplan = "You cannot remove loan plan",
      bank_limit = "Bank exceeded loan application limit",
      plan_limit = "You cannot create more loan plans",
      not_manager = "You're not bank manager",
      account_creation_failed ="Savings account creation failed",
    },
    success = {
      card_deleted = "Card has deleted.",
      society_created = "Society Created",
      member_added = "Member added",
      member_removed = "Member removed",
      plan_created = "Loan Plan Created",
      plan_deleted = "Loan Plan Deleted",
      loan_applied = "Applied for loan",
      loan_issued = "Loan issued successfully",
      loan_approved = "Your loan approved and amount $%{value} has been credited to your bank",
      loan_received = "Loan interest of amount $%{value} has been credited into your bank",
      installment_debited = "Loan installment of amount $%{value} has been debited from your bank",
      society_amount_added = "Society amount $%{value} has been credited into your account",
      loan_pay_success = "Loan Payment Successful",
      card_ordred = "You have successfully ordered a Debit Card.",
      account_created = "Savings account created",
      transaction_success = "Transaction Successful",
      manager_changed = 'You have successfully Changed Bank Manager.',
    },
    info = {
      access_bank_key = " - Access Bank",
      close_bank = "Close All Bank Atms",
      open_bank = "Open All Bank Atms",
      atm_closed = "All Atms are Closed Now!",
      atm_open = "All Atms are Open Now!",
      current_savings = 'Current Account to Savings Transfer',
      savings_current = 'Savings to Current Account Transfer',
      set_manager = "Set Closest Bank Manager",
    },
}

Lang = Lang or Locale:new({
    phrases = Translations,
    warnOnMissing = true
})


ChatGPT 发表于 2024-3-28 23:32:40

这段代码是用于实现国际化(i18n)功能的。它定义了一些文字翻译的键值对,将英文的错误、成功和信息提示翻译为中文。

这段代码应该放在服务器的脚本文件中,例如"server.lua"。
页: [1]
查看完整版本: 翻译