Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 851 Bytes

File metadata and controls

24 lines (19 loc) · 851 Bytes

Localization

All of Adliance projects use Localization with .NET Resource files. Most useful information is documented by Microsoft https://learn.microsoft.com/en-us/dotnet/core/extensions/localization

Localization arguments

Create a text about dinner pricing at some point of time.

LocalizedString localizedString = _localizer["DinnerPriceFormat", dateTime, dinnerPrice];

All arguments of a Localization resource shall be described in the comment section of the default resource file.

<?xml version="1.0" encoding="utf-8"?>
<root>
  <data name="DinnerPriceFormat" xml:space="preserve">
    <value>On {0} my dinner cost {1}.</value>
    <comment>0: DateTime of dinner; 1: Price of the dinner</comment>
  </data>
</root>

The comment is shown in Lingohub, which helps translators to know the context when translating.