[Quasar I18n issues ] how to use default languages
-
hello.
so after setting up Quasar I18n.
-
using {{ $q.i18n.label.close }} works, but the language file is not on my src/en-us, so where did it get the language file from and how do i edit the file or get it into my project.
-
how do i use the default language file that comes with quasar :
export default {
failed: ‘Action failed’,
success: ‘Action was successful’
} -
using {{ $q.i18n.success }} doesn’t work even though my src/en-us has it on the file
thank you
-
-
Got this same problem. Looking for answer. How did you get this to work ?
-
Hi y’all.
i18n is very complicated, and the first thing you should know is the
$q.i18n
is ONLY there to translate the quasar interface. You must set the i18n language flag in yourquasar.conf.js
module.exports = function (ctx) { return { framework: { i18n: 'en-uk',
Quasar pulls the language files from
node_modules/quasar-framework/i18n
.In the docs there is an explanation about how to change the language (and even use lazy loading), but if you are really looking for translating your own strings, then you will need to use something like the
vue-i18n
package. This too is explained in the docs:https://quasar-framework.org/components/internationalization.html
-
Got it , with the vue-i18n it is easy
{{ $t(“success”) }}