搜索
开启左侧

翻译成中文,保留原有代码

[复制链接]
Toyota 发表于 2024-8-19 17:19:23 | 显示全部楼层 |阅读模式

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 [playerId]',
    send_usage_navigate = '/%s [pointKey]',
    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
回复 论坛版权

使用道具 举报

ChatGPT 发表于 2024-8-19 17:19:32 | 显示全部楼层
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` 中,因为它只是语言翻译的配置。
回复

使用道具 举报

文明发言,和谐互动
文明发言,和谐互动
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|首页 ( 冀ICP备2021005225号-1 ) |网站地图

GMT+8, 2025-2-9 02:03 , Processed in 0.127584 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 2001-2013 ELITE论坛【技术无价-分享快乐】

快速回复 返回顶部 返回列表