Add translation to a plugin

translation

(Pad Pors) #1
  1. go to the github repository of the plugin, e. g. discourse-canned-replies.
  • go to /config/locales folder of the plugin. you should see some yml files, like client.en.yml and server.en.yml.

  • the client file is for the text parts in client side and is more important to be translated. texts in server file are only shown to admins.

  • open the English yml file, as we want to first translate this file.

  • press create new file button.

  • copy the text in client.en.yml into the new file.

  • change the first line from en to the proper locale name in discourse. e.g. I want to translate it to Persian, the correct locale name would be fa_IR.

  • now translate the strings between quotations " to your preferred language.

  • save the file into another file named client.fa.yml, if you’re translating it into German the name would be something like this client.de.yml.

  • fill out the information for the file like: Persian translation of client.en.yml.

  • then you should add a pull request, and wait for the plugin owner to accept it.

BTW, there are other topics which show the way for this, but as I didn’t find it in howto just added my own experience:


Events Plugin :calendar:
Locations Plugin
How to add Plugin translations