Add Swedish locale.

This commit is contained in:
Daniel Gent 2021-08-23 19:37:46 +02:00
parent 60be39ed88
commit 362cf9dd03
3 changed files with 10 additions and 5 deletions

View File

@ -14,11 +14,11 @@ interface LOCALE_DATA {
} }
const LOCALES_MAP: Record<string, LOCALE_DATA> = { const LOCALES_MAP: Record<string, LOCALE_DATA> = {
es: { se: {
name: 'Español', name: 'Swedish',
img: { img: {
filename: 'flag-es-co.svg', filename: 'flag-se.svg',
alt: 'Bandera Colombiana', alt: 'svensk flagga',
}, },
}, },
'en-US': { 'en-US': {

View File

@ -14,7 +14,7 @@ const isVendure = provider === 'vendure'
module.exports = withCommerceConfig({ module.exports = withCommerceConfig({
commerce, commerce,
i18n: { i18n: {
locales: ['en-US'], locales: ['en-US', 'se'],
defaultLocale: 'en-US', defaultLocale: 'en-US',
}, },
rewrites() { rewrites() {

5
public/flag-se.svg Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 16 10">
<rect width="16" height="10" fill="#006aa7"/>
<rect width="2" height="10" x="5" fill="#fecc00"/>
<rect width="16" height="2" y="4" fill="#fecc00"/>
</svg>

After

Width:  |  Height:  |  Size: 286 B