diff --git a/README.md b/README.md index 064347f..73e5d55 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Note: If `Custom: Sun card` doesn't appear you will have to reload cleaning the | timeFormat | `'12h'`/`'24h'` | Displayed time format | Locale based on Home assistant language | | title | `string` | Card title | Doesn't display a title by default | | -(1) Supported languages: `de`, `en`, `es`, `fi`, `fr`, `hu`, `it`, `nl`, `pt-BR` +(1) Supported languages: `de`, `en`, `es`, `fi`, `fr`, `hu`, `it`, `nl`, `pt-BR`, `sv` ## Known issues - Home assistant seems to provide next events instead today's one diff --git a/src/assets/localization/languages/sv.json b/src/assets/localization/languages/sv.json new file mode 100644 index 0000000..74ad10e --- /dev/null +++ b/src/assets/localization/languages/sv.json @@ -0,0 +1,9 @@ +{ + "Azimuth": "Azimut", + "Dawn": "Gryning", + "Dusk": "Skymning", + "Elevation": "Elevation", + "Noon": "Middag", + "Sunrise": "Soluppgång", + "Sunset": "Solnedgång" +} diff --git a/src/constants.ts b/src/constants.ts index b475501..c6fe3f9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -7,6 +7,7 @@ import hu from './assets/localization/languages/hu.json' import it from './assets/localization/languages/it.json' import nl from './assets/localization/languages/nl.json' import ptBR from './assets/localization/languages/pt-BR.json' +import sv from './assets/localization/languages/sv.json' import { TSunCardConfig } from './types' export class Constants { @@ -26,6 +27,6 @@ export class Constants { } static readonly HORIZON_Y = 108 - static readonly LOCALIZATION_LANGUAGES = { de, en, es, fi, fr, hu, it, nl, 'pt-BR': ptBR } + static readonly LOCALIZATION_LANGUAGES = { de, en, es, fi, fr, hu, it, nl, 'pt-BR': ptBR, sv } static readonly SUN_RADIUS = 17 }