翻译成中文,保留原有代码
Locales['en'] = {
no_permission = 'Player %s trying to use command / functions without permission',
--Discord logs
info_title = 'rcore_guidebook - INFO log',
critical_title = 'rcore_guidebook - CRITICAL log',
permission_title = 'rcore_guidebook - PERMISSION log',
other_title = 'rcore_guidebook - OTHER log',
--Send help
send_usage = '/%s ',
send_usage_navigate = '/%s ',
player_cannot_be_found_usage = 'Player %s cannot be found',
page_not_found = 'Page %s cannot be found!',
point_not_found = 'Point %s cannot be found!',
navigate_set = 'Navigation point prepared!',
point_not_allowed = 'You cannot start navigation to this point!',
help_text = 'Press ~INPUT_CONTEXT~ to open help',
registered_key_label = 'Opens guidebook',
ui = {
general = {
guide_title = 'Guidebook',
admin_label = 'ADMIN',
irreversible = 'This action is <b>irreversible</b>!',
lost_pages = 'All pages in category will be <b>lost</b>!',
are_you_sure = 'Are you sure?',
guidebook_empty = 'Guidebook is empty Locales['zh'] = {
no_permission = '玩家 %s 尝试使用没有权限的命令/功能',
-- Discord日志
info_title = 'rcore_guidebook - 信息日志',
critical_title = 'rcore_guidebook - 严重日志',
permission_title = 'rcore_guidebook - 权限日志',
other_title = 'rcore_guidebook - 其他日志',
-- 发送帮助
send_usage = '/%s ',
send_usage_navigate = '/%s ',
player_cannot_be_found_usage = '找不到玩家 %s',
page_not_found = '找不到页面 %s!',
point_not_found = '找不到点 %s!',
navigate_set = '导航点已准备好!',
point_not_allowed = '你不能开始导航到这个点!',
help_text = '按 ~INPUT_CONTEXT~ 打开帮助',
registered_key_label = '打开指南',
ui = {
general = {
guide_title = '指南',
admin_label = '管理员',
irreversible = '此操作不可撤销!',
lost_pages = '该类别中的所有页面将丢失!',
are_you_sure = '你确定吗?',
guidebook_empty = '指南为空'
}
}
}
### 脚本文件位置判断
上述代码是用于定义本地化语言文件(translations/localization),通常需要放在服务器端和客户端都可以访问的地方。例如,可以放在 `config.lua` 或某个专属的 `locales` 文件夹中。同时,这段代码并不需要特定放在 `server.lua` 或 `client.lua` 中,因为它只是语言翻译的配置。
页:
[1]