Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scandipwa/locale
Translated bundle switch per Magento store language
https://github.com/scandipwa/locale
Last synced: 14 days ago
JSON representation
Translated bundle switch per Magento store language
- Host: GitHub
- URL: https://github.com/scandipwa/locale
- Owner: scandipwa
- License: osl-3.0
- Created: 2019-12-04T13:41:46.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T13:52:27.000Z (almost 4 years ago)
- Last Synced: 2024-10-14T07:54:06.865Z (about 1 month ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 0
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ScandiPWA Locale
This module exposes multiple locale-related APIs for the theme's `phtml` template.
## Feature breakdown:
**1. Determine locale for store**
Exposes `$this->getLocaleCode()` in the generated `Magento_Theme/templates/scandipwa_root.phtml`. Provides the store's locale code.
**2. Determine language for store**
Exposes `$this->getLanguageCode()`, basically takes the part of `$this->getLocaleCode()` before `_`. E.g. `en_US` => `en`.