Search by

selveq / locale

ahmedwalied

Magento 2 Locale extension for ScandiPWA theme

Package info

github.com/sellveq/locale

Issues

Type:magento2-module

pkg:composer/selveq/locale

Statistics

Installs: 0

Dependents: 2

Suggesters: 0

Stars: 0

3.0.0 2026-09-18 20:13 UTC

This package is not auto-updated.

Last update: 2026-09-19 19:53:52 UTC


README

Fork of scandipwa/locale 2.0.0, maintained by Selveq for Magento 2.4.9 and PHP 8.3. Module name and namespace are unchanged, and the package replaces scandipwa/locale at every version, so it installs as a drop-in replacement. Selveq is not affiliated with or endorsed by Scandiweb.

What it does

  • Gives the ScandiPWA shell the store view's locale: getLanguageCode() fills <html lang> and getLocaleCode() fills window.defaultLocale, so the first render knows its language.
  • Registers a theme whose theme.xml carries <pwa>true</pwa> as theme type 4, the PWA type the other ScandiPWA modules key on.
  • Deploys a PWA theme's own static packages and nothing it inherits when setup:static-content:deploy --theme names only PWA themes, so the parent themes' files are not deployed alongside.
  • Keeps getLocaleChunkUrl(), the URL of the current locale's chunk under the en_US package, for themes older than ScandiPWA 6 whose root template called it.

Install

composer require selveq/locale
bin/magento setup:upgrade

The theme's theme.xml must carry <pwa>true</pwa>, the marker selveq/installer reads; the ScandiPWA theme ships it.

License

OSL-3.0, the license of the original work. Scandiweb's copyright notices are kept in every file, and each file Selveq changed carries a Modifications © Selveq notice.