Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to translate available languages list? #131

Open
7iomka opened this issue Jul 25, 2021 · 0 comments
Open

How to translate available languages list? #131

7iomka opened this issue Jul 25, 2021 · 0 comments

Comments

@7iomka
Copy link

7iomka commented Jul 25, 2021

Hi.
Docs say:

You can use vm.$language.current and vm.$language.available to e.g. easily build a language switch component with a single template:

<template>
  <div>
    <select name="language" v-model="$language.current">
      <option v-for="(language, key) in $language.available" :value="key">{{ language }}</option>
    </select>
  </div>
</template>

My language list is

["English", "Simplified Chinese", "Spanish", "Indonesian", "Portuguese", "Russian", "Japanese", "Hindi", "Vietnamese", "Italian", "Korean", "Thai", "Turkish", "Polish", "Nepali", "Greek", "Serbian"]

I need translation for each of this language to it own language version.
For example, for Simplified Chinese

["英语","简体中文","西班牙语","印度尼西亚语","葡萄牙语","俄语","日语","印地语","越南语","意大利语","韩语","泰语", "土耳其语","波兰语","尼泊尔语","希腊语","塞尔维亚语"]

How to do that?

What I tried:

Object.values(this.$language.available).map((lang) =>this.$gettext(lang));

This only produces

#: src/pages/Index.vue:18
msgid "lang"
msgstr ""

Also I'm tried all variants from https://github.com/Polyconseil/vue-gettext#caveat-when-using-either-the-component-translate-or-directive-v-translate-with-interpolation-inside-v-for
Nothing not working.

Help me please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant