<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://129.151.190.5/index.php?action=history&amp;feed=atom&amp;title=OpenRIMS-RPM_-_Base_Configuration_Part_1</id>
	<title>OpenRIMS-RPM - Base Configuration Part 1 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://129.151.190.5/index.php?action=history&amp;feed=atom&amp;title=OpenRIMS-RPM_-_Base_Configuration_Part_1"/>
	<link rel="alternate" type="text/html" href="http://129.151.190.5/index.php?title=OpenRIMS-RPM_-_Base_Configuration_Part_1&amp;action=history"/>
	<updated>2026-05-01T11:16:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://129.151.190.5/index.php?title=OpenRIMS-RPM_-_Base_Configuration_Part_1&amp;diff=158&amp;oldid=prev</id>
		<title>Khoppenworth: New Page</title>
		<link rel="alternate" type="text/html" href="http://129.151.190.5/index.php?title=OpenRIMS-RPM_-_Base_Configuration_Part_1&amp;diff=158&amp;oldid=prev"/>
		<updated>2023-11-15T17:36:07Z</updated>

		<summary type="html">&lt;p&gt;New Page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The Pharmadex 2 provides true multi-language features. It means that:&lt;br /&gt;
&lt;br /&gt;
1.     The user interface (UI) may be represented in the language selected by a user&lt;br /&gt;
&lt;br /&gt;
2.     A user may use the selected language to fill out on-screen data forms as well as to get documents, reports, etc.&lt;br /&gt;
&lt;br /&gt;
The Pharmadex 2 distribution software allows US English and a national language.&lt;br /&gt;
&lt;br /&gt;
This manual intends for IT experts to help replace the national language provided in the distribution software with the language of a particular country.&lt;br /&gt;
&lt;br /&gt;
To perform this job following IT skills will be needed:&lt;br /&gt;
&lt;br /&gt;
1.     Operation Systems – start and stop Pharmadex 2 service&lt;br /&gt;
&lt;br /&gt;
2.     MySQL database:&lt;br /&gt;
&lt;br /&gt;
3.      Ability to use MySQL Workbench, relation database, and SQL knowledge&lt;br /&gt;
&lt;br /&gt;
4.     MS Excel – ability to use&lt;br /&gt;
&lt;br /&gt;
The roadmap chapter contains a particular example to replace the Nepali language with the Portuguese language. It is possible to define many languages, however, the reasonable choice is two languages. Many languages will slow down Pharmadex 2 and hard to maintain.&lt;br /&gt;
&lt;br /&gt;
Refer to Annex 1 for the troubleshooting.&lt;br /&gt;
&lt;br /&gt;
Annex 2 contains technical data that may be useful to understand how it works “under the stage”.&lt;br /&gt;
&lt;br /&gt;
Annex 3 contains directions on how to maintain labels and messages in the actual state&lt;br /&gt;
&lt;br /&gt;
= 1        Pre-request =&lt;br /&gt;
·       Direct access to Pharmadex 2 server computer console with administrative privileges&lt;br /&gt;
&lt;br /&gt;
·       Supervisor’s access rights to Pharmadex 2&lt;br /&gt;
&lt;br /&gt;
·       The MySQL Workbench is installed and a connection to the Pharmadex 2 database is defined. The rights should be at least query/update&lt;br /&gt;
&lt;br /&gt;
·       The MS Excel released after 2017 is installed&lt;br /&gt;
&lt;br /&gt;
·       The MySQL for Excel plugin is installed, see  &amp;lt;nowiki&amp;gt;https://downloads.mysql.com/archives/excel/&amp;lt;/nowiki&amp;gt;[1]&lt;br /&gt;
&lt;br /&gt;
= 2        The roadmap =&lt;br /&gt;
1.     Stop Pharmadex 2 server&lt;br /&gt;
&lt;br /&gt;
2.     Create a backup copy of the database&lt;br /&gt;
&lt;br /&gt;
3.     Determine languages that are in use&lt;br /&gt;
&lt;br /&gt;
4.     Upload to MS Excel messages for English US language and translate them&lt;br /&gt;
&lt;br /&gt;
5.     Add a new language:&lt;br /&gt;
&lt;br /&gt;
5.1.  Register a new language in the database&lt;br /&gt;
&lt;br /&gt;
5.2.  Remove an excess language&lt;br /&gt;
&lt;br /&gt;
5.3.  Insert messages in the new language into the database&lt;br /&gt;
&lt;br /&gt;
5.4.  Replace the language tag in the demo examples&lt;br /&gt;
&lt;br /&gt;
6.     Start Pharmadex 2 and test the new language&lt;br /&gt;
&lt;br /&gt;
7.     Replace logos&lt;br /&gt;
&lt;br /&gt;
8.     Fine-tune tiles&lt;br /&gt;
&lt;br /&gt;
== 2.1       Stop Pharmadex 2 server ==&lt;br /&gt;
              For MS Windows installation stop the Pharmadex 2 service using the Services tool. Refer to MS Windows documentation for details. The most used tool is “services.msc”.&lt;br /&gt;
&lt;br /&gt;
              For Linux installation stop the Pharmadex 2 service. Refer to the appropriate Linux documentation for details. The most used tool is “systemctl”.&lt;br /&gt;
&lt;br /&gt;
== 2.2       Create a backup copy of the database ==&lt;br /&gt;
Use MySQL Workbench to create a backup copy of the database. Refer to the MySQL workbench manual for details.&lt;br /&gt;
&lt;br /&gt;
Figure 1 Backup dump creation&lt;br /&gt;
&lt;br /&gt;
== 2.3       Determine languages that are in use ==&lt;br /&gt;
              Use MySQL Workbench connection to Pharmadex 2 database to execute a query&lt;br /&gt;
&lt;br /&gt;
SELECT ID, `locale`, `displayname` FROM pdx2.resource_bundle;&lt;br /&gt;
&lt;br /&gt;
Figure 2 Nepali and English US are in use&lt;br /&gt;
&lt;br /&gt;
              '''In this particular example, the Nepali language should be removed. The Portuguese language should be added.'''&lt;br /&gt;
&lt;br /&gt;
== 2.4       Upload to MS Excel messages in English US and translate them ==&lt;br /&gt;
As we determine above (3), the English US language ID is 3. Use MySQL Workbench connection to Pharmadex 2 database to select all messages in English&lt;br /&gt;
&lt;br /&gt;
Query is SELECT * FROM pdx2.resource_message where key_bundle=3&lt;br /&gt;
&lt;br /&gt;
Figure 3 Select all messages in English US  (key_bundle=3)&lt;br /&gt;
&lt;br /&gt;
Figure 4 Select all records from the result&lt;br /&gt;
&lt;br /&gt;
Figure 5. Insert records to MS Excel sheet&lt;br /&gt;
&lt;br /&gt;
Figure 6 Translate them (e.g., to Portuguese)&lt;br /&gt;
&lt;br /&gt;
== 2.5       Add a new language ==&lt;br /&gt;
&lt;br /&gt;
=== 2.5.1       Register a new language in the database ===&lt;br /&gt;
Prepare image of countries flag as SVG file.&lt;br /&gt;
&lt;br /&gt;
Use MySQL Workbench to add a new record into table pdx2.resource_bundle. Fields NmraLogo, and UsaidLogo should be filled with space, not NULL&lt;br /&gt;
&lt;br /&gt;
Figure 7 The Portuguese language has been registered&lt;br /&gt;
&lt;br /&gt;
=== 2.5.2      Remove an excess language ===&lt;br /&gt;
              Use MySQL Workbench to remove the Nepali language registration record from the database. All messages in the Nepali language will be removed as well.&lt;br /&gt;
&lt;br /&gt;
Figure 8 Nepali language bundle is going to be removed&lt;br /&gt;
&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
=== 2.5.3      Insert messages in the new language into the database ===&lt;br /&gt;
              Open the Excel file prepared in 4 and fill out the rightmost column (D) by the ID of the new registered language - 4&lt;br /&gt;
&lt;br /&gt;
Figure 9 Fill out the column D for key_bundle with the key bundle for a new language  (4)&lt;br /&gt;
&lt;br /&gt;
Figure 10 Use MySQL for Excel plugin to insert messages, refer to the plugin’s manual&lt;br /&gt;
&lt;br /&gt;
Figure 11 Define column mapping&lt;br /&gt;
&lt;br /&gt;
Figure 12 Append them&lt;br /&gt;
&lt;br /&gt;
=== 2.5.4      Replace language tag in existing workflow configurations ===&lt;br /&gt;
The distribution database contains demonstration workflows. Their configurations are defined in the old language. Use MySQL workbench to replace language tags in the configuration.&lt;br /&gt;
&lt;br /&gt;
The script below will replace the language tag “ne_NP” with “pt_BR”. Modify it for the actual languages&lt;br /&gt;
&lt;br /&gt;
UPDATE `pdx2`.`concept` c SET `Identifier` = 'pt_BR'&lt;br /&gt;
&lt;br /&gt;
where c.Identifier='ne_NP'&lt;br /&gt;
&lt;br /&gt;
= 3        Start Pharmadex 2 and test the new language =&lt;br /&gt;
              For MS Windows installation start the Pharmadex 2 service using the Services tool. Refer to MS Windows documentation for details. The most used tool is “services.msc”.&lt;br /&gt;
&lt;br /&gt;
              For Linux installation start the Pharmadex 2 service. Refer to appropriative  Linux documentation for details. The most used tool is “systemctl”.&lt;br /&gt;
&lt;br /&gt;
Figure 13 New language is available&lt;br /&gt;
&lt;br /&gt;
= 4        Replace logos =&lt;br /&gt;
Figure 14 Feature Administrate-Configurations-Resources allows uploading logos. Use language switch to upload logos for any given language separately.&lt;br /&gt;
&lt;br /&gt;
= 5        Fine-tune tiles =&lt;br /&gt;
Figure 15 Administrate, Configuration, Tiles, tick-up on the tile group in the table&lt;br /&gt;
&lt;br /&gt;
Figure 16 Administrate page tiles as an example. Click on “Administrate” in the left table for the next screen&lt;br /&gt;
&lt;br /&gt;
Figure 17 Elements available for internationalization&lt;br /&gt;
&lt;br /&gt;
1.     Select the language using the language switch&lt;br /&gt;
&lt;br /&gt;
2.     Fill out this information using the language selected&lt;br /&gt;
&lt;br /&gt;
3.     It is possible to select another picture from a tile&lt;br /&gt;
&lt;br /&gt;
4.     This label should be in the language selected&lt;br /&gt;
&lt;br /&gt;
= 6        Annex 1 Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
== 6.1       The new language doesn’t appear in the language selector ==&lt;br /&gt;
Check table resource_bundle. If the new language is present, restart Pharmadex 2 server. Otherwise, add new language exactly as described in the Roadmap chapter.&lt;br /&gt;
&lt;br /&gt;
== 6.2       The labels in new languages appear improperly ==&lt;br /&gt;
The messages on the selected language appears improperly like 'new_chemical_entity', or 'UserType.TIPC'.&lt;br /&gt;
&lt;br /&gt;
The messages for the language selected are not defined. Suppose it is Portuguese.  To check it:&lt;br /&gt;
&lt;br /&gt;
Execute SELECT * FROM pdx2.resource_bundle;&lt;br /&gt;
&lt;br /&gt;
Figure 18 The Portuguese language is registered. ID is 4&lt;br /&gt;
&lt;br /&gt;
              Execute SELECT * FROM pdx2.resource_message where key_bundle=4&lt;br /&gt;
&lt;br /&gt;
Figure 19 For the Portuguese language messages are not defined&lt;br /&gt;
&lt;br /&gt;
              Insert messages from MS Excel as described in 4.3&lt;br /&gt;
&lt;br /&gt;
== 6.3       The labels for the new language appear in the old language ==&lt;br /&gt;
The ID field in table resource_bundle does not match the ID in resource_message.&lt;br /&gt;
&lt;br /&gt;
To check it, execute SQL queries from 8.2. The resource_message table should contain messages in the wrong language&lt;br /&gt;
&lt;br /&gt;
Figure 20 Messages in English, despite the Portuguese language&lt;br /&gt;
&lt;br /&gt;
              To fix it restore the database from backup and repeat the new language definition. Step, described in chapter 4, may be omitted.&lt;br /&gt;
&lt;br /&gt;
== 6.4       The SVG logo or flag in the language selector doesn’t appear ==&lt;br /&gt;
Open the SVG file locally by browser or lnkscape (&amp;lt;nowiki&amp;gt;https://inkscape.org/&amp;lt;/nowiki&amp;gt;). If the file is consistent, re-import it to the database using the “value editor” feature.&lt;br /&gt;
&lt;br /&gt;
Figure 21 Right-click and Open Value in Editor&lt;br /&gt;
&lt;br /&gt;
Figure 22 The SVG file is a text. Insert it into the Value Editor&lt;br /&gt;
&lt;br /&gt;
= 7        Annex 2 Technical implementation =&lt;br /&gt;
              The internationalization of the user interfaces is grounded on Java i18N approach[2].&lt;br /&gt;
&lt;br /&gt;
              Textual labels and messages are available directly in the database tables:&lt;br /&gt;
&lt;br /&gt;
1.     resource_bundle – keeps languages definitions.&lt;br /&gt;
&lt;br /&gt;
2.     resource_message – keeps textual labels and messages&lt;br /&gt;
&lt;br /&gt;
Each row in the resource_bundle represents a language. Columns are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Column'''&lt;br /&gt;
|'''Purpose'''&lt;br /&gt;
|'''Example'''&lt;br /&gt;
|-&lt;br /&gt;
|Id&lt;br /&gt;
|Unique key  for a language definition&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|sortOrder&lt;br /&gt;
|Order to use in the user interface. The 0  is the highest priority, the rest are the lowest. For more details see  chapter “Language by default” below&lt;br /&gt;
|0 – the default language&lt;br /&gt;
|-&lt;br /&gt;
|basename&lt;br /&gt;
|For compatibility with the previous  release. Should be unique for a language&lt;br /&gt;
|English&lt;br /&gt;
|-&lt;br /&gt;
|locale&lt;br /&gt;
|Locale ID for a language. Please, put  attention to _ (underscore), instead of – (dash) usage. It is to be  compatible with java.util.Locale.toString[3]&lt;br /&gt;
|en_US&lt;br /&gt;
|-&lt;br /&gt;
|displayName&lt;br /&gt;
|Human-readable name of the language&lt;br /&gt;
|לשון עבר&lt;br /&gt;
|-&lt;br /&gt;
|svgFlag&lt;br /&gt;
|Flag to represent the language in the user  interface. Must be defined.&lt;br /&gt;
|&amp;lt;?XML version=&amp;quot;1.0&amp;quot;  encoding=&amp;quot;iso-8859-1&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Generator: Adobe Illustrator…&lt;br /&gt;
|-&lt;br /&gt;
|updatedDate&lt;br /&gt;
|Not used in  Pharmadex 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|createdDate&lt;br /&gt;
|Not used in  Pharmadex 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|UsaidLogo&lt;br /&gt;
|Not used in  Pharmadex 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NmraLogo&lt;br /&gt;
|Not used in  Pharmadex 2&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
              Each row in resource_message table represents a text on the language as key-value pair:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Column'''&lt;br /&gt;
|'''Purpose'''&lt;br /&gt;
|'''Example'''&lt;br /&gt;
|-&lt;br /&gt;
|id&lt;br /&gt;
|Unique key  for a text in a language&lt;br /&gt;
|5376&lt;br /&gt;
|-&lt;br /&gt;
|message_key&lt;br /&gt;
|Unique  language - independent key for a text&lt;br /&gt;
|global_cancel&lt;br /&gt;
|-&lt;br /&gt;
|message_value&lt;br /&gt;
|Value in a  language&lt;br /&gt;
|Cancel&lt;br /&gt;
|-&lt;br /&gt;
|key_bundle&lt;br /&gt;
|Id in  resource_bundle to link to the language&lt;br /&gt;
|3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       The Pharmadex 2 database allows defining multi-language classifiers (dictionaries) as well as files to upload (resources). When a user selects a language, the Pharmadex 2 switches the language of the user interface, dictionaries, and resources. Thus, a user can fill out the application electronic form in the language selected.&lt;br /&gt;
&lt;br /&gt;
When a user fills application electronic form, Pharmadex 2 stores user input for each language separately. Suppose the form in Portuguese&lt;br /&gt;
&lt;br /&gt;
'''Fator de forma''': [Caixa Cinza]     &lt;br /&gt;
&lt;br /&gt;
              When a user will switch to English it will be:&lt;br /&gt;
&lt;br /&gt;
'''Form factor:''' [Caixa Cinza]&lt;br /&gt;
&lt;br /&gt;
              It is possible to change the data in the English form&lt;br /&gt;
&lt;br /&gt;
'''Form factor:''' [Gray Box]&lt;br /&gt;
&lt;br /&gt;
              The Portuguese form will still keep&lt;br /&gt;
&lt;br /&gt;
'''Fator de forma''': [Caixa Cinza]&lt;br /&gt;
&lt;br /&gt;
       The English form will keep:&lt;br /&gt;
&lt;br /&gt;
'''Form factor:''' [Gray Box]&lt;br /&gt;
&lt;br /&gt;
              The true multi-language is a powerful, however costly feature:&lt;br /&gt;
&lt;br /&gt;
·       The database should keep and process more data.&lt;br /&gt;
&lt;br /&gt;
·       The data in the database is complex, because of the necessity to keep language for any data element&lt;br /&gt;
&lt;br /&gt;
·       The initial input and maintenance of multi-language dictionaries and resources are costly   &lt;br /&gt;
&lt;br /&gt;
The two languages are the optimal choice.       &lt;br /&gt;
&lt;br /&gt;
= 8        Annex 3 Maintenance and language by default =&lt;br /&gt;
Figure 23 Feature Administrate-Configurations-Messages allows changing initial uploaded labels and messages as well as adding missed ones&lt;br /&gt;
&lt;br /&gt;
              When a user enters Pharmadex first time, the system proposed a language that is defined in the file “application.properties” under the key spring.web.locale, e.g., “spring.web.locale=en_US”. It is recommended not re-define this key to the local language because some browsers will not accept the local language, thus Pharmadex 2 will be inaccessible.&lt;br /&gt;
&lt;br /&gt;
              When a user selects a language, this selection will be stored in the file cookie on the user’s computer. All follow-up calls will set the selected language. The time to live the selection is a year or until a user will switch to another language.&lt;br /&gt;
&lt;br /&gt;
----[1] This plugin is out of support for now. Despite this it is available yet. The MS Excel export-import features will be implemented in Pharmadex 2 ASAP.&lt;br /&gt;
&lt;br /&gt;
[2] &amp;lt;nowiki&amp;gt;https://docs.oracle.com/javase/8/docs/technotes/guides/intl/index.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] &amp;lt;nowiki&amp;gt;https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#toString()&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Khoppenworth</name></author>
	</entry>
</feed>