No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [Quasar I18n issues ] how to use default languages

    Help
    3
    4
    1010
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • syflex
      syflex last edited by syflex

      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

      1 Reply Last reply Reply Quote 0
      • S
        syshex last edited by

        Got this same problem. Looking for answer. How did you get this to work ?

        1 Reply Last reply Reply Quote 0
        • nothingismagick
          nothingismagick last edited by

          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 your quasar.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

          1 Reply Last reply Reply Quote 1
          • S
            syshex last edited by

            Got it , with the vue-i18n it is easy

            {{ $t(“success”) }}

            1 Reply Last reply Reply Quote 0
            • First post
              Last post