cbi18n
v2.x
v2.x
  • Introduction
  • Intro
    • Release History
      • Whats New With 2.0.0
    • About this Book
    • Author
  • GETTING STARTED
    • Overview
    • Installation
    • Configuration
  • Usage
    • Coding for i18n
      • Java vs JSON resources
      • Property inheritance
      • Resource Bundle Tools
      • Custom Resource Services
    • How do I change Locales?
    • Best Practices
    • Resources
Powered by GitBook
On this page

Was this helpful?

Edit on Git
Export as PDF
  1. Usage
  2. Coding for i18n

Java vs JSON resources

PreviousCoding for i18nNextProperty inheritance

Last updated 4 years ago

Was this helpful?

For existing projects you probably have existing resource files, probably JSON files or java resources. For new projects you can ask yourself if you would choose JSON or java properties. Here are some pros and cons

  • JSON is a simple file format, supported by many editors.

  • Many frontend Javascript frameworks also support JSON

  • If you use many different locales it can become complex to make sure all keys are entered in all resource bundles. You might need specialized editors to keep track of all translated keys.

  • It is not hard to generate your own JSON resource files from a database.

  • if you already used cbi18n v1 you probably have java properties files.

  • there are very capable (free) resource editors available for java properties.

  • Several web based translation facilities provide export to java properties and/or json resources

A very basic list of resource editors will be discussed .

in the next paragraph