You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am facing a difficulty with specific type of access to localized messages array / object.
In my Vue3 application I would like to iterate through the subnodes of translated texts, the structure looks like this:
Right now if the quantity of subnodes changes I need to modify the source code, what I would like to achieve is some kind of measurement telling the code how many subnodes exists, f.e. nodes.length would give me the expected value. How can I programmatically access messages imported into vue-i18n-next to be able to work with the translated texts as an object accessible from js / Vue3 <script /> block?
This is how I am invoking the i18n support in my Vue3 application:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am facing a difficulty with specific type of access to localized messages array / object.
In my Vue3 application I would like to iterate through the subnodes of translated texts, the structure looks like this:
Since I know how many subnodes there are (3 in the example) I can use this approach:
Right now if the quantity of subnodes changes I need to modify the source code, what I would like to achieve is some kind of measurement telling the code how many subnodes exists, f.e.
nodes.length
would give me the expected value.How can I programmatically access messages imported into vue-i18n-next to be able to work with the translated texts as an object accessible from js / Vue3
<script />
block?This is how I am invoking the i18n support in my Vue3 application:
PS: I am so happy you are investing your time in this great project, thank you for this effort guys.
Beta Was this translation helpful? Give feedback.
All reactions