• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

nodebb Custom translations

Scheduled Pinned Locked Moved General Discussion
10 Posts 4 Posters 2.0k Views
    • 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.
  • P Offline
    P Offline
    pikshub
    wrote on last edited by
    #1

    how to? Is there a way?

    PitaJP 1 Reply Last reply
    1
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to pikshub on last edited by
    #2

    @pikshub what do you mean by custom translations?

    P 1 Reply Last reply
    0
  • P Offline
    P Offline
    pikshub
    replied to PitaJ on last edited by
    #3

    @PitaJ I would like to translate the way I want. Independent from transifex

    PitaJP 1 Reply Last reply
    2
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to pikshub on last edited by
    #4

    @pikshub so in the folder public/language there are all the translations. You can copy one, call it pikshub, then you should be able to edit all of the translations you want. You should then be able to restart NodeBB and select pikshub 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.

    P djensen47D 2 Replies Last reply
    2
  • P Offline
    P Offline
    pikshub
    replied to PitaJ on last edited by
    #5

    Thank you very much @PitaJ

    1 Reply Last reply
    0
  • djensen47D Offline
    djensen47D Offline
    Dave Jensen
    replied to PitaJ on last edited by
    #6

    @PitaJ It's been a few years since this post. Is this still the way to override translations? I'd like to change a confirm message.

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #7

    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:

    Write/overwrite localization for plugins?

    In you plugin.json, add a languages string. "languages": "public/language" Your directory structure would look like this: /public/ language/ en_GB/ ...

    favicon

    NodeBB Community (community.nodebb.org)

    You can actually override plugin translations as well as long as your plugins are loaded in the correct order.

    1 Reply Last reply
    1
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #8

    I know some forums maintain a single plugin for all of the customizations they need: translations, styles, templates, scripts, etc

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #9

    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.

    1 Reply Last reply
    1
  • smartpunterS Offline
    smartpunterS Offline
    smartpunter
    wrote on last edited by
    #10

    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?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development