PhotoDemon icon indicating copy to clipboard operation
PhotoDemon copied to clipboard

[Other] - (Contributing Hindi and Bengali translation)

Open ghoshriju33 opened this issue 4 years ago • 1 comments

I would like to contribute language translations of Hindi and Bengali. I'm sure this will help the program accessible to more local users.

I would appreciate if anyone can guide me through.

ghoshriju33 avatar Oct 08 '20 08:10 ghoshriju33

Hello @ghoshriju33! Thank you for your generous offer to contribute new translations to PhotoDemon. I am thrilled at the prospect of supporting Hindi and Bengali languages.

PhotoDemon's language files are plain-text XML files (UTF-8 encoded). A "Master" language file ships with all PhotoDemon downloads. It can be found in the /App/PhotoDemon/Languages/Master/MASTER.xml file of your local PhotoDemon copy. That file is the starting point for all new language translations.

You can start a new language translation one of two ways:

  1. Using PhotoDemon's built-in Tools > Language Editor screen. That wizard is rudimentary, but it will walk you through the general process of starting a new language file. This tool will automatically generate a new language file for you, and the language file will be stored in the /Data/Languages folder of your local PhotoDemon copy (e.g. Data/Languages/Hindi.xml). It also provides a screen for seeing which phrases are not translated yet, and you can enter and save those phrases right there in the dialog.

  2. You can also translate the file manually, without using PhotoDemon at all. Any text editor will work. (I personally use Notepad++, but the regular Notepad app or any other text editor will also work).

To manually create a new language file, just copy the MASTER.xml file into the /Data/Languages folder of your local PhotoDemon copy. Rename it to match the language you are working on (e.g. Hindi.xml). Then open the file in any text editor, and replace the top five XML tags with your language and author information, perhaps like this:

<langid>hi-IN</langid> <langname>हिन्दी</langname> <langversion>8.9.86</langversion> <langstatus>you can put anything here; perhaps "work in progress"</langstatus> <author>your name as you want it to appear inside PhotoDemon</author>

From there, translating is simply a matter of filling in all the blank <translation></translation> tags with translated text! (This is the hard part, of course 😄 )

Once your new language file has been created, you can run PhotoDemon and select your language from the Tools > Language menu to test your work. If you make changes to the language file, you can switch PhotoDemon to English, then back to your language to force the program to load any new changes. (You can also restart the app if that's easier.)

Like any project, please periodically make backups of your work, just in case!

I think that's all there is to it! I know translations can be a lot of work, so if you start work but later decide it is too much, please don't feel bad. Even a partial translation is a huge help.

You are welcome to send me updates as you have them, or you can wait until the files are complete. Whatever is easiest for you!

If you are familiar with GitHub, you can submit language changes as formal pull requests. You can also attach your updated language file(s) to this issue page, or email them to me directly at tanner<at>photodemon.org.

Thank you again for your help. PhotoDemon would not be possible without generous contributors like you.

tannerhelland avatar Oct 08 '20 19:10 tannerhelland

Thank you again for this kind offer, @ghoshriju33. I hope to hear from you again someday!

In the meantime, I am closing this issue because several years have passed without progress. I would love to support Hindi or Bengali in future PhotoDemon releases, and would welcome any help on that front.

If someone stumbles upon this in the future and can provide further help, please comment and I'll happily reopen the issue. 🙏

tannerhelland avatar Sep 13 '22 17:09 tannerhelland