サーチ…


構文

  • <Vendor Namespace> - ここでベンダーのカスタムテーマまたは組み込みテーマのネームスペースIE Magento/Lumaここでlumavendor namespace

  • <言語パッケージディレクトリ> - en_usnl_nlen_gbなどの言語パッケージディレクトリ

  • <言語パッケージの説明> - English Us Packageようなパッケージの説明を追加します

  • <言語パッケージコード> - 言語パッケージIE en_USまたはnl_NLまたはen_GBコード

備考

上記のファイルとディレクトリを作成した後、 language_package_code.csvVendor Namespaceディレクトリに移動します

/app/i18n/luma/en_us/en_US.csv

または

/app/i18n/luma/en_gb/en_GB.csv

または

/app/i18n/luma/nl_NL/nl_NL.csv

オーバーライドi18n言語パッケージの構文例

/ app / i18n / <Vendorネームスペース> / <言語パッケージディレクトリ> /composer.json

{
    "name": "<vendor namespance>/<language package directory>",
    "description": "<language package description>",
    "version": "100.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/framework": "100.0.*"
    },
    "type": "magento2-language",
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

/ app / i18n / <Vendorネームスペース> / <language pack> /language.xml

<?xml version="1.0"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
    <code><language package code></code>
    <vendor><vendor namespace></vendor>
    <package><language package directory></package>
</language>

/ app / i18n / <ベンダーネームスペース> / <言語パック> /registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
    '<vendor namespance>_<language package directory>',
    __DIR__
);


Modified text is an extract of the original Stack Overflow Documentation
ライセンスを受けた CC BY-SA 3.0
所属していない Stack Overflow