Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Note that since this is done on the legacy admin UI, these changes will disappear when the instance is rebuilt.

To persist these changes in the instance, create an .xml file in the distro/configuration/globalproperties folder. The above example in the file would look like:

Code Block
languagexml
<config>
    <globalProperties>
        <globalProperty>
        <property>layout.address.format</property>
        <value>
            &lt;org.openmrs.layout.address.AddressTemplate&gt;
            &lt;nameMappings class=&quot;properties&quot;&gt;
            &lt;property name=&quot;address1&quot; value=&quot;Location.address1&quot;/&gt;
            &lt;property name=&quot;address2&quot; value=&quot;Location.address2&quot;/&gt;
            &lt;property name=&quot;address3&quot; value=&quot;Location.address3&quot;/&gt;
            &lt;property name=&quot;address4&quot; value=&quot;Location.address4&quot;/&gt;
            &lt;/nameMappings&gt;
            &lt;sizeMappings class=&quot;properties&quot;&gt;
            &lt;property name=&quot;address1&quot; value=&quot;10&quot;/&gt;
            &lt;property name=&quot;address2&quot; value=&quot;40&quot;/&gt;
            &lt;property name=&quot;address3&quot; value=&quot;40&quot;/&gt;
            &lt;property name=&quot;address4&quot; value=&quot;40&quot;/&gt;
            &lt;/sizeMappings&gt;
            &lt;lineByLineFormat&gt;
            &lt;string&gt;address1&lt;/string&gt;
            &lt;string&gt;address2&lt;/string&gt;
            &lt;string&gt;address3 address4&lt;/string&gt;
            &lt;/lineByLineFormat&gt;
        &lt;requiredElements&gt;\\n&quot; + &quot; &lt;/requiredElements&gt;\\n&quot; + &quot; &lt;/org.openmrs.layout.address.AddressTemplate&gt;
        </value>
        </globalProperty>
    </globalProperties>
</config>
Note

The < and > symbols should be marked as &lt and &gt.

Language Translation of Address Labels

To change the strings that would display as the labels instead of address1, address2, etc. Add a folder called messageproperties to the reference application repository distro/configuration folder. Add separate files for each language that you wish to support. Eg:-

...