Dear colleagues ,
I am using DHIS2 version 184.108.40.206
I have some program rules for vaccination place in child routine immunization
for example if the previous vaccination place is at hospital or at this facility, then other data elements regarding vaccination in another facility should be hidden
as for the data element to be hidden , which is written in arabic language that is another problem am facing. where the data element keep showing up in arabic even when i use english interface and database
Thanks heaps for providing the extra info.
I have a hunch you have some DE names in both English & Arabic, as their default language, from looking at your PR Actions of ‘Hide field’ e.g. first of them in Arabic & then the second in EN with ‘HT_reasons_change_facility’?
If so this may be causing the problem but I can’t say 100%.
I would recommend reviewing your metadata & naming them all in English as the ‘System default’ language, then translating the objects to Arabic.
See how you go, but that is my reasoning to your problem.
Good luck mate
Dear @dmnscar as a matter of fact i have posted another problem here where am facing the problem with this particular DE of Other Facility were it keep showing in Arabic language while the DE details (Name, short name, description …etc) all in English but i translated it to Arabic and then i cannot get rid of its problems.
Hi @Haliz.t! Looking at the issue in the current post and the other one regarding the data elements, I am suspecting that somehow the Arabic name of a data element is actually stored under name and not under translation.
You can check the details of the data element using the api:
Check what is stored under name and what is stored under translation.
There might be some other issues that you need to check:
Cache (both cache cleaner and Data Administration/Maintenance/clear application cache)
Program rule variables: type and translation. PRVs should not be translated.
The issue with the the form names is affecting attributes, but not data elements. Here, both form names or names can be used.
Check the system and user setting for language: db locale and Interface (UI) locale.
following your recommendation this is how the API for that data element look like and it seems that under english locale it is saved as arabic name , however am not good at using APIs, so would it be possible that you tell me how to fix it? with much appreciation
The issue is that the baseline name is in English:
“Name”: “HT_Other Facility”.
But then you have an English translation of the same data element property:
“property”: “NAME”, “locale”: “en”, “value”: “”
So, in order to solve the problem, you need to get rid of the English translation. In order to do this, you can use translation app, select the English locale and delete the en translation of the NAME, SHORT_NAME and FORM_NAME.
There is an option to do it with a 3-rd party app like postman or using command line. (GET and PUT commands).
See what you feel most comfortable with.
Let me know if it helps.
Dears @YuryR@dmnscar I would like to kindly inform you that this issue of program rule not working when translating Option sets and related options to Arabic language, has been solved thankfully by the kind support of @hanin.saadah …
Below are the steps she mentioned thankfully…
For the Arabic translation issue, try this:
All your meta data (data elements & option sets) should be in English
Translate data elements & options or option sets to Arabic using translation feature (the user can convert to Arabic interface then the meta data will appear in Arabic)
When you create the options inside option set make sure that the code is in English, and the code of the data element also, like the following for example:
When you create the program rule, you should first create a program rule variable that is associated with specific data element, try to check and select the option “Use code for option set” and continue to build your program rules as usual but inside the rule expression you should put the code of the option or the code of the data element, not the display name.