0

I'm building a new application in JSE for which I want to support internationalization. I've never built such an application. I'm looking for the best practices for internationalization. The application will be writing the translated data in files or a database. I've searched for best practices but I didn't find anything about best practices for internationalization in layered applications.

  • Should I put all the internationalization data in some layer or next to the object they are about?

  • Could I directly use the properties files as a kind of enum to do a switch case?
    Or can I reverse engineer the data catched and know the default internationalize value and work with it?

1 Answer 1

0

I would consider avoiding redundant and therefor potentially inconsistent translations and other i18n settings (decimal point, number formats etc.) a best practice here.

It depends on your environment/framework which means you have to achieve that, and where you need to add homegrown solutions. Can't say anything about JSE; in Qt I'm using external translation files that can be loaded by multiple modules/apps and put the settings either into a central getter or the global settings where possible.

Synchronizing all modules when the settings have changed is another challenge. The simplest solution is often a restart, applying them at runtime in a consistent and all-encompassing way usually needs a lot of additional effort.

The decision how to solve these issues may even affect your architecture, so it should be addressed early in the design process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.