- 追加された行はこの色です。
- 削除された行はこの色です。
[[Magentoめも]]
いくつか方法はあるようです。~
http://inchoo.net/magento-2/magento-2-create-multilanguage-store/
Magento2はインストール直後は英語のみですが、フロント側を多言語に対応してみます。
まずは以下から日本語のパッケージを入れてみます。
https://www.mageplaza.com/kb/magento-2-language-pack/
composerが必要になります。
$ composer.phar require mageplaza/magento-2-japanese-language-pack:dev-master
UsernameとPasswordを求められますが、Magento MarketplaceのPublic KeyとPrivate Keyを入力することになります。~
https://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html
$ php bin/magento setup:static-content:deploy ja_JP
$ php bin/magento cache:flush
インストール先は vendor/mageplaza/magento-2-japanese-language-pack になります。~
STORES - Configuration - GeneralにてLocale OptionsのLocaleをJapanese(Japan)を選択、Country OptionsのDefault CountryをJapanへすることで日本語表示に切り替えることができます。
言語切り替えはStore Viewを複数作成し、そのStore Viewに各言語を紐付けるイメージです。たぶん。
STORES - All Stores にて Default Store View を選択し、Nameを日本語に変更
Create Store View にて以下の設定でViewを作成します。
|Store|Main Website Store|
|Name|English|
|Code|en_us|
|Status|Enabled|
|Sort Order|1|
STORES - ConfigurationにてStore ViewをEnglishに切り替え、~
General - Locale Options のLocaleにてEnglish(United States)を選択。
これでキャッシュをクリアすると、日本語とEnglishの切り替えが可能となります。