简体   繁体   中英

Creating custom languages for install4j installer?

I have a question about how to add new languages to the installer. We are currently internationalizing our application. For testing purposes we want to display the installer in our test language.

My initial work around was first to copy the contents of the "messages_en.utf8" file in the

install4j ->resources -> messages directory

and added a messages_xx.utf8 file to said directory, containing said contents. I then ran that file through a standalone translator tool that I built that just translates the String following the equal sign, giving me a key value pair containing the "translated" String.

So now I have the appropriate xx_messages.utf8 file. Then, I go to the languages file and add my new language, "xx=NewLanguage" . So now I have a language that will show up in the language tab as well as a corresponding message file.

Now, Everything works just as it's expected to, however, my actual question is, Is this the correct way to add arbitrary languages? So If I want the installer to be rendered in Chittagonian in the future, would this be the proper way to achieve that goal, or is there a better way to go about creating new languages for the installer?

Now, Everything works just as it's expected to, however, my actual question is, Is this the correct way to add arbitrary languages?

Yes, that's correct. You also would have to add the key:

languages.xx=Language name

to messages_en.utf8 and possibly to other support language files. This is for the language selection dialog.

So If I want the installer to be rendered in Chittagonian in the future, would this be the proper way to achieve that goal

Yes, just note there is no proper RTL support in install4j as of 5.1.6 and the GUI may not look good for RTL languages.


Update 2018-02-03

As of install4j 6.1, RTL support has been added.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM