Comments (6)
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.
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.
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.
GMT+8 here, 11 hours away 😄
FYI, you can check language files of Vssue here.
from vuepress-theme-meteorlxy.
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.
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)
- [Bug Report] 不可以使用plugin吗?
- [Bug Report] Fail to configure Vssue's `proxy` via `themeConfig.comments.proxy` HOT 2
- [Bug Report] useGeo: true 无法生成随机图片 HOT 1
- [Feature Request] custom home page HOT 1
- [Bug Report] 草稿内容在分类和标签页面展现 HOT 5
- anchor 失效问题 HOT 3
- 关于点击文章分类或标签展示的一个小bug HOT 3
- [Bug Report] 首页点击标签或分类跳转,会显示 draft HOT 1
- [Bug Report] Banner is blank HOT 1
- [Bug Report] build打包后社交媒体图标不显示 HOT 3
- [Feature Request] Img Thumbnail HOT 3
- [Feature Request] 关于社交媒体图标被广告拦截插件屏蔽的优化点 HOT 2
- [Bug Report] palette.styl设置无效,smoothScroll无效 HOT 3
- [Feature Request] add smoothScroll config HOT 4
- 要不要考虑添加一些国内的社交媒体链接?[Feature Request]
- 你好,npm run build编译失败
- [Bug Report] The Header Image doesn't work HOT 1
- Add Dark Mode support [Feature Request] HOT 3
- Add icon setting [Feature Request] HOT 1
- [Bug Report] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuepress-theme-meteorlxy.