Difference between revisions of "Extensions.I18n.LocalizeQuantityToUnitGroup"
Jump to navigation
Jump to search
| (One intermediate revision by one other user not shown) | |||
| Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
| − | + | QuantityTerm I18n.LocalizeQuantityToUnitGroup(QuantityTerm quantity, UnitGroupDefinition equivalentUnitGroup); | |
| − | |||
| − | |||
| − | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
| − | The '''LocalizeQuantityToUnitGroup''' term | + | The '''LocalizeQuantityToUnitGroup''' term will create a version of a '''Quantity''' localized to a specific unit group. |
| − | There are two different types of unit groups: country and equivalent unit groups. This term | + | There are two different types of unit groups: country and equivalent unit groups. This term will create a new '''Quantity''' containing the display unit given by the new group that is equivalent to the display unit of the original '''Quantity'''. |
{{TermReturnValue| [[Extensions.Quantities.Quantity|Quantity]] | A new '''Quantity''' contains the display unit given by the new group}} | {{TermReturnValue| [[Extensions.Quantities.Quantity|Quantity]] | A new '''Quantity''' contains the display unit given by the new group}} | ||
| Line 21: | Line 18: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
| − | {{TableRowPropertie1| Quantity | [[Extensions.Quantities.Quantity|Quantity]] | [[Term]] | - | [1] | This represents the quantity that | + | {{TableRowPropertie1| Quantity | [[Extensions.Quantities.Quantity|Quantity]] | [[Term]] | - | [1] | This represents the quantity that will be localized using the given country unit group name.}} |
| − | {{TableRowPropertie2| EquivalentUnitGroup | [[UnitGroupDefinition]] |-| - | [1] | Represents the UNIT-GROUP definition that | + | {{TableRowPropertie2| EquivalentUnitGroup | [[UnitGroupDefinition]] |-| - | [1] | Represents the UNIT-GROUP definition that will be used as the target for unit localization.}} |
|} | |} | ||
Latest revision as of 02:44, 13 September 2019
Contents
Classification
| Name | LocalizeQuantityToUnitGroup |
| Short Description | Creates a version of a Quantity localized to a specific unit group |
| Class | Term |
| Extension | OTX i18n extension |
| Group | Quantity related terms |
| Exceptions | UnknownUnitException InvalidConversionException |
| Checker Rules | Quantities_Chk001 |
| Standard Compliant | Yes |
OTL Syntax
QuantityTerm I18n.LocalizeQuantityToUnitGroup(QuantityTerm quantity, UnitGroupDefinition equivalentUnitGroup);Description
The LocalizeQuantityToUnitGroup term will create a version of a Quantity localized to a specific unit group.
There are two different types of unit groups: country and equivalent unit groups. This term will create a new Quantity containing the display unit given by the new group that is equivalent to the display unit of the original Quantity.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
| Data Type | Description |
| Quantity | A new Quantity contains the display unit given by the new group |
Properties
| Name | Data Type | Class | Default | Cardinality | Description |
| Quantity | Quantity | Term | - | [1] | This represents the quantity that will be localized using the given country unit group name. |
| EquivalentUnitGroup | UnitGroupDefinition | - | - | [1] | Represents the UNIT-GROUP definition that will be used as the target for unit localization. |
OTL Examples
/// Local Declarations
Quantities.Quantity Quantity1 = 6 [@Unit, "ODX_RS_UNIT_LIB.odx", "A/m²"];
Quantities.Quantity Quantity2;
/// Flow
Quantity2 = I18n.LocalizeQuantityToUnitGroup(Quantity1);