laravel6本地化中文翻译文件

7 篇文章 0 订阅

auth.php

路径:resources/lang/zh-cn/auth.php

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Authentication Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines are used during authentication for various
    | messages that we need to display to the user. You are free to modify
    | these language lines according to your application's requirements.
    |
    */

    'failed' => '这些凭据与我们的记录不匹配。',
    'throttle' => '登录尝试过多。请在:seconds秒后重试。',

];

pagination.php

路径:resources/lang/zh-cn/pagination.php

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Pagination Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines are used by the paginator library to build
    | the simple pagination links. You are free to change them to anything
    | you want to customize your views to better match your application.
    |
    */

    'previous' => '&laquo; 上一页',
    'next' => '下一页 &raquo;',

];

passwords.php

路径:resources/lang/zh-cn/passwords.php

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Pagination Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines are used by the paginator library to build
    | the simple pagination links. You are free to change them to anything
    | you want to customize your views to better match your application.
    |
    */

    'previous' => '&laquo; 上一页',
    'next' => '下一页 &raquo;',

];

validation.php

路径:resources/lang/zh-cn/validation.php

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines contain the default error messages used by
    | the validator class. Some of these rules have multiple versions such
    | as the size rules. Feel free to tweak each of these messages here.
    |
    */
    'accepted' => ':attribute必须被接受。',
    'active_url' => ':attribute不是有效的URL。',
    'after' => ':attribute必须是:date之后的日期。',
    'after_or_equal' => ':attribute必须是等于或小于:date的日期。',
    'alpha' => ':attribute只能包含字母。',
    'alpha_dash' => ':attribute只能包含字母,数字,破折号和下划线。',
    'alpha_num' => ':attribute只能包含字母和数字。',
    'array' => ':attribute必须是一个数组。',
    'before' => ':attribute必须是:date之前的日期。',
    'before_or_equal' => ':attribute必须是:date之前或等于的日期。',
    'between' => [
        'numeric' => ':attribute必须介于:min和:max之间。',
        'file' => ':attribute必须介于:min和:max千字节之间。',
        'string' => ':attribute必须介于:min和:max之间。',
        'array' => ':attribute必须在:min和:max之间。',
    ],
    'boolean' => ':attribute字段必须为true或false。',
    'confirmed' => ':attribute确认不匹配。',
    'date' => ':attribute不是有效日期。',
    'date_equals' => ':attribute必须是等于:date的日期。',
    'date_format' => ':attribute与格式:format不匹配。',
    'different' => ':attribute不能与:other相同。',
    'digits' => ':attribute必须为:digits位数。',
    'digits_between' => ':attribute必须介于:min和:max数字之间。',
    'dimensions' => ':attribute的图片尺寸无效。',
    'distinct' => ':attribute字段具有重复值。',
    'email' => ':attribute必须是有效的电子邮件地址。',
    'ends_with' => ':attribute必须以下列之一结尾::values',
    'exists' => '所选的:attribute无效。',
    'file' => ':attribute必须是一个文件。',
    'filled' => ':attribute字段必须有一个值。',
    'gt' => [
        'numeric' => ':attribute必须大于:value。',
        'file' => ':attribute必须大于:value千字节。',
        'string' => ':attribute必须大于:value字符。',
        'array' => ':attribute必须包含多个:value项目。',
    ],
    'gte' => [
        'numeric' => ':attribute必须大于或等于:value。',
        'file' => ':attribute必须大于或等于:value千字节。',
        'string' => ':attribute必须大于或等于:value字符。',
        'array' => ':attribute必须具有:value项或更多。',
    ],
    'image' => ':attribute必须是图像。',
    'in' => '所选的:attribute无效。',
    'in_array' => ':attribute字段在:other中不存在。',
    'integer' => ':attribute必须为整数。',
    'ip' => ':attribute必须是有效的IP地址。',
    'ipv4' => ':attribute必须是有效的IPv4地址。',
    'ipv6' => ':attribute必须是有效的IPv6地址。',
    'json' => ':attribute必须是有效的JSON字符串。',
    'lt' => [
        'numeric' => ':attribute必须小于:value。',
        'file' => ':attribute必须小于:value千字节。',
        'string' => ':attribute必须小于:value字符。',
        'array' => ':attribute必须少于:value个项目。',
    ],
    'lte' => [
        'numeric' => ':attribute必须小于或等于:value。',
        'file' => ':attribute必须小于或等于:value千字节。',
        'string' => ':attribute必须小于或等于:value字符。',
        'array' => ':attribute不得超过:value个项目。',
    ],
    'max' => [
        'numeric' => ':attribute不得大于:max。',
        'file' => ':attribute不得大于:max千字节。',
        'string' => ':attribute不得大于:max个字符。',
        'array' => ':attribute不能超过:max个项目。',
    ],
    'mimes' => ':attribute必须是类型::values的文件。',
    'mimetypes' => ':attribute必须是类型::values的文件。',
    'min' => [
        'numeric' => ':attribute必须至少为:min。',
        'file' => ':attribute必须至少为:min千字节。',
        'string' => ':attribute必须至少为:min个字符。',
        'array' => ':attribute必须至少包含:min个项目。',
    ],
    'not_in' => '所选的:attribute无效。',
    'not_regex' => ':attribute格式无效。',
    'numeric' => ':attribute必须为数字。',
    'password' => '密码错误。',
    'present' => ':attribute字段必须存在。',
    'regex' => ':attribute格式无效。',
    'required' => ':attribute字段是必填字段。',
    'required_if' => '当:other是:value时,:attribute字段是必需的。',
    'required_unless' => '除非:other位于:values中,否则:attribute字段是必填字段。',
    'required_with' => '如果存在:values,则:attribute字段是必需的。',
    'required_with_all' => '存在:values时,:attribute字段是必需的。',
    'required_without' => '当:values不存在时,:attribute字段是必需的。',
    'required_without_all' => '当:values不存在时,:attribute字段是必需的。',
    'same' => ':attribute和:other必须匹配。',
    'size' => [
        'numeric' => ':attribute必须为:size。',
        'file' => ':attribute必须为:size千字节。',
        'string' => ':attribute必须为:size字符。',
        'array' => ':attribute必须包含:size项。',
    ],
    'starts_with' => ':attribute必须以下列之一开头::values',
    'string' => ':attribute必须为字符串。',
    'timezone' => ':attribute必须是有效区域。',
    'unique' => ':attribute已经被使用。',
    'uploaded' => ':attribute上传失败。',
    'url' => ':attribute格式无效。',
    'uuid' => ':attribute必须是有效的UUID。',

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | Here you may specify custom validation messages for attributes using the
    | convention "attribute.rule" to name the lines. This makes it quick to
    | specify a specific custom language line for a given attribute rule.
    |
    */

    'custom' => [
        'attribute-name' => [
            'rule-name' => 'custom-message',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Attributes
    |--------------------------------------------------------------------------
    |
    | The following language lines are used to swap our attribute placeholder
    | with something more reader friendly such as "E-Mail Address" instead
    | of "email". This simply helps us make our message more expressive.
    |
    */

    'attributes' => [
        'username' => '用户名',
        'account'  => '账号',
        'captcha'  => '验证码',
        'mobile'   => '手机号',
        'password' => '密码',
        'content'  => '内容',
        'identity' => '手机号/用户名',
    ],

];


en.json

路径:resources/lang/en.json

{
    "Login": "Login",
    "Register": "Register",
    "Mobile": "Mobile",
    "Password": "Password",
    "Remember Me": "Remember Me",
    "Forgot Your Password?": "Forgot Your Password?"
}

zh-cn.json

路径:resources/lang/zh-cn.json

{
    "Login": "登录",
    "Register": "注册",
    "Mobile":"手机号码",
    "Password": "密码",
    "Remember Me": "记住我",
    "Forgot Your Password?": "忘记密码?"
}

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值