Giter VIP home page Giter VIP logo

Comments (6)

meteorlxy avatar meteorlxy commented on July 23, 2024 1

Thanks for your interests.

The strategy used in the default theme is a possible solution : translate the text in the themeConfig by the users themselves. In this way, our theme only need to load the text from the themeConfig.

vue-i18n is another choice, because we have more text need to be translated than the default theme.

But I've not tried vue-i18n in Vuepress yet. As you feedback, there might be some problems to make them work together.

PS: Never mind, my english is not so good, too . 😂

PPS: Would you like to help Vssue support pt-BR, too? 😄

from vuepress-theme-meteorlxy.

meteorlxy avatar meteorlxy commented on July 23, 2024 1

What about this way:

  • We provide languages files in lib/langs/ dir:
+-- lib/
    +-- langs/
        +-- pt-BR.js
        +-- en-US.js
        +-- zh-CN.js
        ....
  • Users choose language in themeConfig:
// .vuepress/config.js
module.exports = {
  themeConfig: {
    lang: require('vuepress-theme-meteorlxy/lib/langs/en-US'),
  },
}
  • If the language is not supported, users can set manually in themeConfig:
// .vuepress/config.js
module.exports = {
  themeConfig: {
    lang: {
      hello: 'hola',
    },
  },
}
  • Also, users can override some fields:
// .vuepress/config.js
module.exports = {
  themeConfig: {
    lang: Object.assign(require('vuepress-theme-meteorlxy/lib/langs/en-US'), {
      hello: 'hola',
    }),
  },
}

from vuepress-theme-meteorlxy.

tgmti avatar tgmti commented on July 23, 2024 1

Liked it.

at night i´ll look this (i´m in gmt-3 time zone)

Vssue support pt-BR, too? 😄
sure! in progress too !

Thanks for availability

from vuepress-theme-meteorlxy.

meteorlxy avatar meteorlxy commented on July 23, 2024 1

GMT+8 here, 11 hours away 😄

FYI, you can check language files of Vssue here.

from vuepress-theme-meteorlxy.

meteorlxy avatar meteorlxy commented on July 23, 2024 1

@tgmti

Close this as i18n is supported in 1.0.0-alpha.15 🎉

Feedback welcome if you have any ideas about that

from vuepress-theme-meteorlxy.

tgmti avatar tgmti commented on July 23, 2024

thanks a lot!

later I´ll apply in my project, and will work to send PR with pt-BR too

from vuepress-theme-meteorlxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.