Code Monkey home page Code Monkey logo

dcm4chee-arc-lang's Introduction

Resources for providing different languages for the Web UI of dcm4chee-arc-light

There are two different types of language specific resources:

  • a key/value map in JSON format used by the UI for labeling UI components, and
  • various JSON Schema files, specifying the name, type, description, default value of configuration attributes of various configuration entities.

First are located under src/main/webapp/##.json, second under src/main/webapp/##/assets/schema/, with ## as the ISO 639-1 two-letter code of the language (e.g. es for Spain, pt for Portuguese, ru for Russian).

For adding support of an additional language, copy src/main/webapp/en.json to src/main/webapp/##.json, with ## as the ISO 639-1 two-letter code of the new language and replace the English property values by their translations.

Create a new directory src/main/webapp/##/assets/schema/ and copy the JSON Schema files from src/main/webapp/en/assets/schema/ to the new directory and replace the English values for "title" and "description" JSON properties.

Alternatively to directly editing JSON Schema files, you may translate title and description separated by | in corresponding key/value properties files, located in src/props, and committing the modified files under a subdirectory named with the ISO 639-1 two-letter code of the language:

  1. The English version of the key/value properties files are created/updated from the JSON Schema files by invoking dcm4che's utility json2props:

    $ json2props src/main/webapp/en/assets/schema src/props/en
    src/main/webapp/en/assets/schema/hl7ExportRule.schema.json=>src/props/en/hl7ExportRule.props
    src/main/webapp/en/aassets/schema/hl7OrderScheduledStation.schema.json=>src/props/en/hl7OrderScheduledStation.props
    ...
    src/main/webapp/assets/en/schema/metrics.schema.json=>src/props/en/metrics.props
    
  2. Translated versions of the key/value properties files for one language can be converted back to JSON Schema files by invoking (e.g.)

    $ json2props src/main/webapp/en/assets/schema src/props/hi src/main/webapp/hi/assets/schema
    src/props/hi/hl7ExportRule.props=>src/main/webapp/hi/assets/schema/hl7ExportRule.schema.json
    src/props/hi/hl7OrderScheduledStation.props=>src/main/webapp/hi/assets/schema/hl7OrderScheduledStation.schema.json
    ...
    src/props/hi/metrics.props=>src/main/webapp/hi/assets/schema/metrics.schema.json
    

    If the translated key/value properties files miss some (new) entries already defined in the English version of the JSON Schema files in src/main/webapp/en/assets/schema, the created language specific JSON Schema file are supplemented with the entries from the English version.

  3. Converting the so created JSON Schema files back to the language specific key/value properties files by invoking (e.g.)

    $ json2props src/main/webapp/hi/assets/schema src/props/hi
    src/main/webapp/hi/assets/schema/hl7ExportRule.schema.json=>src/props/hi/hl7ExportRule.props
    src/main/webapp/hi/assets/schema/hl7OrderScheduledStation.schema.json=>src/props/hi/hl7OrderScheduledStation.props
    :
    src/main/webapp/hi/assets/schema/metrics.schema.json=>src/props/hi/metrics.props
    

    will add the previous missing entries in the key/value properties files, where title and description in English separated by | can be replaced by translated terms.

  4. After the replacement of the supplemented new properties, the language specific JSON Schema files can be updated with the new translated terms by converting the updated key/value properties files back to JSON Schema files as described in 2..

dcm4chee-arc-lang's People

Contributors

vrindanayak avatar gunterze avatar shral avatar rinape avatar marcheschi avatar hczedik avatar fanxting avatar vandendal avatar kkostikov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.