Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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`.