dcm4chee-arc-ligh UI internationalization contribution (Other Language support besides of English)

221 views
Skip to first unread message

Shefki Esadi

unread,
Apr 8, 2020, 8:33:35 AM4/8/20
to dcm...@googlegroups.com
Hallo,

we are about to finish the implementation of the internationalization of the UI of dcm4chee-arc-light. For all those who want to contribute on adding his/here native language as possible language in the UI, you could do that like follows:

The translation of the UI is splitted in two parts, one part is the JSON-schemas of that are used from the Configurator (Descriptions and Titles in the Configurator) and the the second part is everything else.

Translating everything else but the Configurator you can do that like follows:

     1. You can find the code of your language in this list that we prepared ( ISO 639-1 two-letter code ), if you can not find your language pleas report to us by creating an issue. This list was generated from many lists that are online available, if you see some error pleas report to us. (The Flags are generated automatically too, if you thing any flag should be changed or is wrong report to us (we know that there can be many flags for one language valid)), The flags are coded in base64. (For Example I choose Albanian and for Albanian the code is "sq") *)
     2. If there is no file with that name here, create a JSON-file (we prefer doing that in github directly (if you are logged-in in github you will have the possibility to create a file and make a pull request), so everyone else knows that you are working on that langue,like that we prevent doing the same work from many persons) with the code of your language as a name of the file (in my example would be `sq.json`) copy the content of this file and paste in your currently created file. Edit the first line by replacing `en` in the `"locale": "en"` with the code of your language (in my example would be `"locale": "sq"`. And start translating the values of the file from English in to your language (again we prefer that you do the changes in the github directly, so many people can work at the same translation). If there is a file with the language that you want, check if the translation of that file is finished or maybe you could help finishing the translation (or propose changes).

If you see curly brackets (like {$@@error}) or HTML code (like <label>Some text</label>) change the text arround or between but leve those like they are for example:

English:
`"preparemsg.error": "Error:{$@@error}<br>\n"`
Albanian:
`"preparemsg.error": "Gabim:{$@@error}<br>\n",`


English:
`"orderby.patient": "<label>Patient </label>"`
Albanian:
`"orderby.patient": "<label>Pacienti </label>"`
etc.


Translation of the Schemas for the Configurator:

We extracted all texts that are in the JSON-schemas in an CSV-files and since those CSV-files are not needed directly in the project, they are in an separate project. So to translate the Configurator you need to translate those CSV-Files by doing following (here too we suggest that you do that directly in the github  (specially if you are not familiar with git))
  1. Create a sub-directory in directory schema with the ISO 639-1 two-letter code of the language as name (in my Example `sq`).
  2. Copy all CSV files from the schema to the created sub-directory.
  3. Replace the title and description fields by the translated terms in the copied files.
*) Like @Dr Suresh Viswanathan suggested, If you want to add a list that is only for specific country than add the short code of that country  as name in the file too (For Example sq_AL.json)
Best Regards
Shefki Esadi

Message has been deleted
Message has been deleted

Dr Suresh Viswanathan

unread,
Apr 9, 2020, 7:05:59 AM4/9/20
to dcm...@googlegroups.com
I was going through the language list and noticed that you've linked each language to a single country. I believe this is the wrong way to go about it. Languages (ISO 639-1) have a many to many relationship with Countries (ISO 3166-2) so should be listed separately. For example Spanish is the official language of Spain and pretty much most of South America. However each country has their own variant that can be distinct. The best example would probably be British English & American English where not only does the spelling differ, in some cases the meaning does too! Switzerland has German and French which it shares with Germany and France respectively.

Oh, and BTW Tamil (ta) should come under Country Code "IN" (India) although it's one of the official languages of Singapore (SG). Also, language codes are lower case while country codes are upper case. 

Finally I propose the specific language file be a mix of ISO 639-1 & ISO 3166-2 which in your case would be sq_AL.json. en_GB.json & en_US.json would handle two different variants of English. More at Language localisation - Language tags and codes

The above observations are based on my experience and I hope you find this useful. I have spend a lot of time working on Language localisation& Internationalisation courtesy of living a country with with more than a 100 languages!

Regards,

Suresh


On Wednesday, April 8, 2020 at 6:03:35 PM UTC+5:30, Shefki Esadi wrote:
Hallo,

we are about to finish the implementation of the internationalization of the UI of dcm4chee-arc-light. For all those who want to contribute on adding his/here native language as possible language in the UI, you could do that like follows:

The translation of the UI is splitted in two parts, one part is the JSON-schemas of that are used from the Configurator (Descriptions and Titles in the Configurator) and the the second part is everything else.

Translating everything else but the Configurator you can do that like follows:

     1. Find the code of your language in this list that we prepared ( ISO 639-1 two-letter code ), if you can not find your language pleas report to us by creating an issue. This list was generated from many lists that are online available, if you see some error pleas report to us. (The Flags are generated automatically too, if you thing any flag should be changed or is wrong report to us (we know that there can be many flags for one language valid)), The flags are coded in base64. (For Example I choose Albanian and for Albanian the code is "sq")

     2. If there is no file with that name here, create a JSON-file (we prefer doing that in github directly (if you are logged-in in github you will have the possibility to create a file and make a pull request), so everyone else knows that you are working on that langue,like that we prevent doing the same work from many persons) with the code of your language as a name of the file (in my example would be `sq.json`) copy the content of this file and paste in your currently created file. Edit the first line by replacing `en` in the `"locale": "en"` with the code of your language (in my example would be `"locale": "sq"`. And start translating the values of the file from English in to your language (again we prefer that you do the changes in the github directly, so many people can work at the same translation). If there is a file with the language that you want, check if the translation of that file is finished or maybe you could help finishing the translation (or propose changes).

If you see curly brackets (like {$@@error}) or HTML code (like <label>Some text</label>) change the text arround or between but leve those like they are for example:

English:
`"preparemsg.error": "Error:{$@@error}<br>\n"`
Albanian:
`"preparemsg.error": "Gabim:{$@@error}<br>\n",`


English:
`"orderby.patient": "<label>Patient </label>"`
Albanian:
`"orderby.patient": "<label>Pacienti </label>"`
etc.


Translation of the Schemas for the Configurator:

We extracted all texts that are in the JSON-schemas in an CSV-files and since those CSV-files are not needed directly in the project, they are in an separate project. So to translate the Configurator you need to translate those CSV-Files by doing following (here too we suggest that you do that directly in the github  (specially if you are not familiar with git))
  1. Create a sub-directory in directory schema with the ISO 639-1 two-letter code of the language as name (in my Example `sq`).
  2. Copy all CSV files from the schema to the created sub-directory.
  3. Replace the title and description fields by the translated terms in the copied files.

Best Regards
Shefki Esadi

Gunter Zeilinger

unread,
Apr 9, 2020, 8:19:25 AM4/9/20
to dcm...@googlegroups.com
I agree, that we should not wire a one to one relation between one language and one country in our data models. But we should also only add complexity as needed - e.g. as long we have no different contributions of translations to Spanish spoken in Spain and Argentina, it should be sufficient to just provide one es.json, instead of having to provide identity copies in es_ES.json and es_AR.json.

my 2 ¢




Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, April 9, 2020 1:05 PM, Dr Suresh Viswanathan <sur...@raster.in> wrote:

I was going through the language list and noticed that you've linked each language to a single country. I believe this is the wrong way to go about it. Languages (ISO 639-1) have a many to many relationship with Countries (ISO 3166-1 alpha-2) so should be listed separately. For example Spanish is the official language of Spain and pretty much most of South America. However each country has their own variant that can be distinct. The best example would probably be British English & American English where not only does the spelling differ, in some cases the meaning does too! Switzerland has German and French which it shares with Germany and France respectively.

Oh, and BTW Tamil (ta) should come under Country Code "IN" (India) although it's one of the official languages of Singapore (SG). Also, language codes are lower case while country codes are upper case. 

Finally I propose the specific language file be a mix of ISO 3166-1 alpha-2 & ISO 639-1 which in your case would be AL_sq.json. GB_en.json & US_en.json would handle two different variants of English.

I hope you find this useful. I have spend a lot of time working on Internationalisation and Unicode courtesy of living a country with with more than a 100 languages!


--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Shefki Esadi

unread,
Apr 9, 2020, 1:40:08 PM4/9/20
to dcm4che
(I'm trying a third time to post a response, google forum is deleting for some reason my messages)

Hi,
thank you for you feedback, you are right of course! The list what I generated should be more like a look up list (I generated mostly for the base64 flags) and should be updated and evolved while we get concrete language-files. In the UI Config drop-down would be anyway a small updated list visible (depending on real languages for which we have translations, so the user don't need and should not see all possible combinations of language and country code). I didn't wanted to make the country code mandatory (there can be cases where one want's to specify only the language code, and that should be enough), so if one wants/needs to use the counter code in addition to language code one can do that, the UI should work with both variants (I edited my previous post saying that one can use the Country code).
I would say lets wait and see which languages we really get from the community
Best Regards
Shefki Esadi


On Thursday, April 9, 2020 at 1:05:59 PM UTC+2, Dr Suresh Viswanathan wrote:
I was going through the language list and noticed that you've linked each language to a single country. I believe this is the wrong way to go about it. Languages (ISO 639-1) have a many to many relationship with Countries (ISO 3166-2) so should be listed separately. For example Spanish is the official language of Spain and pretty much most of South America. However each country has their own variant that can be distinct. The best example would probably be British English & American English where not only does the spelling differ, in some cases the meaning does too! Switzerland has German and French which it shares with Germany and France respectively.

Oh, and BTW Tamil (ta) should come under Country Code "IN" (India) although it's one of the official languages of Singapore (SG). Also, language codes are lower case while country codes are upper case. 

Finally I propose the specific language file be a mix of ISO 639-1 & ISO 3166-2 which in your case would be sq_AL.json. en_GB.json & en_US.json would handle two different variants of English. More at Language localisation - Language tags and codes

The above observations are based on my experience and I hope you find this useful. I have spend a lot of time working on Language localisation& Internationalisation courtesy of living a country with with more than a 100 languages!

Regards,

Suresh

On Wednesday, April 8, 2020 at 6:03:35 PM UTC+5:30, Shefki Esadi wrote:
Hallo,

we are about to finish the implementation of the internationalization of the UI of dcm4chee-arc-light. For all those who want to contribute on adding his/here native language as possible language in the UI, you could do that like follows:

The translation of the UI is splitted in two parts, one part is the JSON-schemas of that are used from the Configurator (Descriptions and Titles in the Configurator) and the the second part is everything else.

Translating everything else but the Configurator you can do that like follows:

     1. Find the code of your language in this list that we prepared ( ISO 639-1 two-letter code ), if you can not find your language pleas report to us by creating an issue. This list was generated from many lists that are online available, if you see some error pleas report to us. (The Flags are generated automatically too, if you thing any flag should be changed or is wrong report to us (we know that there can be many flags for one language valid)), The flags are coded in base64. (For Example I choose Albanian and for Albanian the code is "sq")

     2. If there is no file with that name here, create a JSON-file (we prefer doing that in github directly (if you are logged-in in github you will have the possibility to create a file and make a pull request), so everyone else knows that you are working on that langue,like that we prevent doing the same work from many persons) with the code of your language as a name of the file (in my example would be `sq.json`) copy the content of this file and paste in your currently created file. Edit the first line by replacing `en` in the `"locale": "en"` with the code of your language (in my example would be `"locale": "sq"`. And start translating the values of the file from English in to your language (again we prefer that you do the changes in the github directly, so many people can work at the same translation). If there is a file with the language that you want, check if the translation of that file is finished or maybe you could help finishing the translation (or propose changes).

If you see curly brackets (like {$@@error}) or HTML code (like <label>Some text</label>) change the text arround or between but leve those like they are for example:

English:
`"preparemsg.error": "Error:{$@@error}<br>\n"`
Albanian:
`"preparemsg.error": "Gabim:{$@@error}<br>\n",`


English:
`"orderby.patient": "<label>Patient </label>"`
Albanian:
`"orderby.patient": "<label>Pacienti </label>"`
etc.


Translation of the Schemas for the Configurator:

We extracted all texts that are in the JSON-schemas in an CSV-files and since those CSV-files are not needed directly in the project, they are in an separate project. So to translate the Configurator you need to translate those CSV-Files by doing following (here too we suggest that you do that directly in the github  (specially if you are not familiar with git))
  1. Create a sub-directory in directory schema with the ISO 639-1 two-letter code of the language as name (in my Example `sq`).
  2. Copy all CSV files from the schema to the created sub-directory.
  3. Replace the title and description fields by the translated terms in the copied files.

Best Regards
Shefki Esadi

Message has been deleted

Dr Suresh Viswanathan

unread,
Apr 11, 2020, 1:02:52 AM4/11/20
to dcm...@googlegroups.com
Looks like your messages got flagged as potential spam and had to be manually cleared by an admin user!

Suresh

On 09-Apr-2020, at 23:06, Shefki Esadi <shefki...@j4care.com> wrote:

(I'm trying a third time to post a response, google forum is deleting for some reason my messages)

Hi,
thank you for you feedback, you are right of course! The list what I generated should be more like a look up list (I generated mostly for the base64 flags) and should be updated and evolved while we get concrete language-files. In the UI Config drop-down would be anyway a small updated list visible (depending on real languages for which we have translations, so the user don't need and should not see all possible combinations of language and country code). I didn't wanted to make the country code mandatory (there can be cases where one want's to specify only the language code, and that should be enough), so if one wants/needs to use the counter code in addition to language code one can do that, the UI should work with both variants (I edited my previous post saying that one can use the Country code).
I would say lets wait and see which languages we really get from the community
Best Regards
Shefki Esadi

On Thursday, April 9, 2020 at 1:05:59 PM UTC+2, Dr Suresh Viswanathan wrote:
--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages