https://github.com/scandipwa/locale
Translated bundle switch per Magento store language
https://github.com/scandipwa/locale
Last synced: 2 months 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T13:52:27.000Z (over 4 years ago)
- Last Synced: 2025-03-23T09:48:26.787Z (3 months ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- 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`.