nodebb Custom translations
-
@pikshub what do you mean by custom translations?
-
@pikshub so in the folder
public/language
there are all the translations. You can copy one, call itpikshub
, then you should be able to edit all of the translations you want. You should then be able to restart NodeBB and selectpikshub
as the default language.For now, that's how you have to do it. But in the future there may be a plugin to make the translation override easier.
-
The best way is to create a plugin overriding the main translations. You just create a new json file in the plugin languages folder and it will be merged on top of the core translations. This might be helpful:
https://community.nodebb.org/post/44253
You can actually override plugin translations as well as long as your plugins are loaded in the correct order.
-
I know some forums maintain a single plugin for all of the customizations they need: translations, styles, templates, scripts, etc
-
I was at one point working on a plugin for customizing translations and templates, I've been meaning to pick it back up and finish it, as it's a useful feature.
-
I still didn't get it. Can someone write a short instruction?
So, we have in file /public/language/en-US/pages.json key "unread" with value "Unread Topics"
What should i do, so when user selects en-US language, she will see not "Unread Topics", but "Some other phrase" where 'pages.unread' placeholder is used?Of course i do not want to change this string value directly in the language file, as it will be overwritten during future updates. But what should i do?