From aa2624f60ddbf8d1fe45bf4f9f8e3eb8a3b4cbfe Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Thu, 30 Mar 2023 00:19:36 +0200 Subject: docs: Explanation on expanding language selector (#248) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Explanation on expanding language selector * docs: Give full path instead of just filename Co-authored-by: Rémy Raes --------- Co-authored-by: Rémy Raes --- docs/DEVELOPMENT.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 370bf42b..94c1bac7 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -221,6 +221,29 @@ export const i18n = createI18n({ }); ``` +In order to be able to select it, make sure to that it to the `LanguageSelector` componenent in `src-vue/src/components/LanguageSelector.vue`. + +```vue +export default defineComponent({ + name: 'LanguageSelector', + data: () => ({ + value: '', + options: [ + { + value: 'en', + label: 'English' + }, + + { + value: 'de', + label: 'Deutsch' + }, + ] + }), + +}) +``` + There are different ways to use translations in views; in HTML template, invoke the `$t` method with translation key: ```html -- cgit v1.2.3