diff --git a/README.md b/README.md index ebc5c1a..e5d89e4 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,13 @@ entity: sensor.weather_station_uv The following languages are supported: -| Language | Yaml Value | Supported Since | Translated by | -| --------- | ---------- | --------------- | ----------------------------------------------------------------------------------- | -| English | `en` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) | -| French | `fr` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) | -| German | `de` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) | -| Italian | `it` | v?.?.? | [@SiriosDev](https://github.com/SiriosDev) | +| Language | Yaml value | Supported | Translated by | +| --------- | ---------- | --------- | ----------------------------------------------------------------------------------- | +| Dutch | `nl` | v1.2.0 | [@WoBBeLNL](https://github.com/WoBBeLnl) | +| English | `en` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) | +| French | `fr` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) | +| German | `de` | v1.0.0 | [@t1gr0u](https://github.com/t1gr0u) | +| Italian | `it` | v1.2.0 | [@SiriosDev](https://github.com/SiriosDev) | ## Thanks to diff --git a/src/localize/languages/nl.json b/src/localize/languages/nl.json new file mode 100644 index 0000000..7152859 --- /dev/null +++ b/src/localize/languages/nl.json @@ -0,0 +1,17 @@ +{ + "common": { + "version": "Versie", + "invalid_configuration": "Ongeldige configuratie", + "show_warning": "Toon waarschuwing", + "show_error": "Toon foutmelding", + "uv_index": "UV index", + "uv_risk": "UV risico" + }, + "uv_levels": { + "low": "Laag", + "moderate": "Matig", + "high": "Hoog", + "very_high": "Zeer hoog", + "extreme": "Extreem" + } +} diff --git a/src/localize/localize.ts b/src/localize/localize.ts index 211dfca..d65a18c 100644 --- a/src/localize/localize.ts +++ b/src/localize/localize.ts @@ -1,6 +1,7 @@ import * as de from './languages/de.json'; import * as en from './languages/en.json'; -import * as fr from "./languages/fr.json"; +import * as fr from './languages/fr.json'; +import * as nl from './languages/nl.json'; import * as it from "./languages/it.json"; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -8,7 +9,8 @@ const languages: any = { de: de, en: en, fr: fr, - it: it + nl: nl, + it: it, }; export function localize(string: string, search = '', replace = ''): string {