Custom Terms and Localization: Difference between revisions

From UmsWiki
Jump to navigation Jump to search
Created blank page
 
Created the initial wiki page for Custom Terms and Localization
Line 1: Line 1:
Custom Terms and Localization is the first step in allowing you to alter the text that is displayed anywhere in the app.


== Prerequisites ==
* UMS Web
* Basic understanding of XML
== Getting started ==
You must create a file for each language you want to create your own translations for.
This file must be saved in your root web folter (generally located at 'C:\inetpub\wwwroot'), under the subfolder of \App\Localization\Translations.*culture*.xml
You need to create the Localization subdirectory if it does not exist. Example:
C:\inetpub\wwwroot\App\Localization\Translations.DK.xml
Note: While technically you can call the culture anything (for example Translations.arbitraryname.xml), it is recommended to call it the same culture as you use inside the XML file, for easier overview. The name simply needs to follow the pattern of 'Translations.*.xml'
=== Sample file ===
<root culture="da-DK">
    <entry key="StudentNumberHeader">Studie nummer</entry>
    <entry key="DateHeader">Sidst fornyet</entry>
    <entry key="BirthdayHeader">Fødselsdato</entry>
    <entry key="ExpiryDateHeader">Udløber d.</entry>
</root>
A Translation file always needs a root element called 'root'. This root element needs a single attribute called 'culture', with the value of the chosen culture.
Supported cultures are
* 'da-DK' (Danish)
* 'en-US' (English)
* 'nb' (Norwegian)
* 'fo-FO' (Faroese)
The root element must contain an 'entry' element for each translated key you want to override. The key attribute must match the key used in UMS App.
Inside this element you can write your desired text. Note that this text will have all leading and trailing whitespaces removed.
== FAQ ==
* ''The translations are not getting loaded''
Check the Event Viewer, if anything is wrong with the XML structure, it will write an error entry here.
* ''The app is not using the translations''
These translations are only updated once aday, as well as on log in/out.
* ''Letters like Æ, Ø and Å are shown incorrectly''
Make sure when you save the XML file, that you save it as Unicode encoding. While other types of encoding may work, Unicode has been confirmed to work with all Scandinavian letters

Revision as of 12:15, 19 October 2018

Custom Terms and Localization is the first step in allowing you to alter the text that is displayed anywhere in the app.

Prerequisites

  • UMS Web
  • Basic understanding of XML

Getting started

You must create a file for each language you want to create your own translations for.

This file must be saved in your root web folter (generally located at 'C:\inetpub\wwwroot'), under the subfolder of \App\Localization\Translations.*culture*.xml

You need to create the Localization subdirectory if it does not exist. Example:

C:\inetpub\wwwroot\App\Localization\Translations.DK.xml

Note: While technically you can call the culture anything (for example Translations.arbitraryname.xml), it is recommended to call it the same culture as you use inside the XML file, for easier overview. The name simply needs to follow the pattern of 'Translations.*.xml'

Sample file

<root culture="da-DK">
    <entry key="StudentNumberHeader">Studie nummer</entry>
    <entry key="DateHeader">Sidst fornyet</entry>
    <entry key="BirthdayHeader">Fødselsdato</entry>
    <entry key="ExpiryDateHeader">Udløber d.</entry>
</root>

A Translation file always needs a root element called 'root'. This root element needs a single attribute called 'culture', with the value of the chosen culture.

Supported cultures are

  • 'da-DK' (Danish)
  • 'en-US' (English)
  • 'nb' (Norwegian)
  • 'fo-FO' (Faroese)

The root element must contain an 'entry' element for each translated key you want to override. The key attribute must match the key used in UMS App.

Inside this element you can write your desired text. Note that this text will have all leading and trailing whitespaces removed.

FAQ

  • The translations are not getting loaded

Check the Event Viewer, if anything is wrong with the XML structure, it will write an error entry here.

  • The app is not using the translations

These translations are only updated once aday, as well as on log in/out.

  • Letters like Æ, Ø and Å are shown incorrectly

Make sure when you save the XML file, that you save it as Unicode encoding. While other types of encoding may work, Unicode has been confirmed to work with all Scandinavian letters