aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-03-30 00:19:36 +0200
committerGitHub <noreply@github.com>2023-03-29 22:19:36 +0000
commitaa2624f60ddbf8d1fe45bf4f9f8e3eb8a3b4cbfe (patch)
treee4207f023b55ef146aa896aef3b126c8c90f1e72 /docs
parenteb4ffba68a24ce2e3eb3a1a816bd7254f23faa34 (diff)
downloadFlightCore-aa2624f60ddbf8d1fe45bf4f9f8e3eb8a3b4cbfe.tar.gz
FlightCore-aa2624f60ddbf8d1fe45bf4f9f8e3eb8a3b4cbfe.zip
docs: Explanation on expanding language selector (#248)
* docs: Explanation on expanding language selector * docs: Give full path instead of just filename Co-authored-by: Rémy Raes <contact@remyraes.com> --------- Co-authored-by: Rémy Raes <contact@remyraes.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/DEVELOPMENT.md23
1 files changed, 23 insertions, 0 deletions
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