不适用
github.com/scandipwa/locale
源代码
安装次数: 172,382
依赖项: 2
建议者: 0
安全性: 0
星标: 0
关注者: 4
分支: 6
类型:magento2-module
Requires
Requires (Dev)
None
Suggests
Provides
Conflicts
Replaces
OSL-3.0 ac149527f28381b7f13f57e07f0cbf9ab19999bb
This package is auto-updated.
Last update: 2024-09-07 22:11:26 UTC
此模块为主题的 phtml 模板暴露多个与区域设置相关的API。
phtml
1. 确定商店的区域设置
在生成的 Magento_Theme/templates/scandipwa_root.phtml 中暴露 $this->getLocaleCode()。提供商店的区域代码。
Magento_Theme/templates/scandipwa_root.phtml
$this->getLocaleCode()
2. 确定商店的语言
暴露 $this->getLanguageCode(),基本上取 $this->getLocaleCode() 中 _ 之前的部分。例如,en_US => en。
$this->getLanguageCode()
_
en_US
en