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
Is it possible to have just one file per language? I have just a few texts per page and it doesn't make much sense to have then separate files. I'd like to use a js file instead of json and separate the pages with comments.
This library is meant to be module-based, so every translation "module" should have a specific key (so the lib can identify later which modules are already loaded and prevent duplicit loads). This means that you can use this config:
constlang={en: 'English',cs: 'Česky'}exportconstconfig={translations: {en: { lang },cs: { lang }},loaders: [{locale: 'en',key: 'common',loader: async()=>awaitimport('./en.js')},{locale: 'cs',key: 'common',loader: async()=>awaitimport('./cs.js')}]}
which results in $t('common.your.translations') inside your .svelte files.
Thanks for the library.
Is it possible to have just one file per language? I have just a few texts per page and it doesn't make much sense to have then separate files. I'd like to use a js file instead of json and separate the pages with comments.
I tried this config
it doesn't throw any errors but the
t
method just returns the argument string.The text was updated successfully, but these errors were encountered: