New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zh_CN locale to build #357
Comments
I'm not sure. @evshiron, do you know? |
Sorry but I have no idea what that "zh_CN locale" means. The files in |
I have some input with my findings on this topic. If it's about OSX sdk build, I guess the root cause is the same as mine which I already have a patch as pull request #389. The issue for me is when we package the app with nw-builder, all the locales directories are deleted which are originally existing in nwjs (Tested with 3.1.2). My patch is to retain locale directories instead but only deleting files inside so that multi local support is still available to the apps packaged by nw-builder. There's nothing you can do in package.json if the locale directories are already dropped off. If it's about OSX/Win normal builds, the issue will be different and the problem is on nwjs side that it lacks locales folders other than 'en' in their official build(checked with 0.14.7). However, we want nw-builder to always retain the locales regardless of those flavours. Hope it helps. |
[1128] nw18 解决locale判断失效 nw.build()
.then(() => {
// mac
;['en', 'zh_CN', 'zh_TW'].forEach(k => {
const d = `../regt-app/Genie/osx64/Genie.app/Contents/Resources/${k}.lproj`
fs.outputFileSync(d, '')
})
}) (2) 也可以考虑引入os-locale这个库 if (IS_WIN) {
const winPath = process.env.windir || process.env.WINDIR
const wmicPath = winPath + '\\system32\\webm'
process.env.PATH = [wmicPath, process.env.PATH].join(';')
}
try {
return require('os-locale').sync()
} catch (e) {
return 'en'
} |
@chenweiyj Closing this for now. Let me know if you still want this feature. |
Is it possible to point it out in package.json?
The text was updated successfully, but these errors were encountered: