Difference between revisions of "Parameter Regexp"

From Lingoport Wiki
Jump to: navigation, search
(Created page with "== Resource Parameters == A resource files contains resources, i.e. strings which are translated. A resource is typically a key value pair. In Java properties files for instan...")
 
(No difference)

Latest revision as of 23:15, 20 April 2017

Resource Parameters

A resource files contains resources, i.e. strings which are translated. A resource is typically a key value pair. In Java properties files for instance, a key value pair looks like the following:

 KEY_DESC=Description of the widget for {userName}. 

{userName} is a parameter in this string. It will be replaced by a variable at run time, say, John Smith. To the U.S. English string shown for KEY_DESC will end up looking like Description of the widget for John Smith.

When returning a translated string, the parameter needs to have been preserved, i.e. in the French string will need to include the {userName} parameter. For instance:

 KEY_DESC=Description de la widget pour {userName}.

and not

 KEY_DESK=Description de la widget pour {nom d'utilisateur}.