Class InvariantFriendlyNameToLocalizationUpgrade
Helper class for upgrading the inariant friendly name from the existing data model to a given culture in the localizer.
Inheritance
Inherited Members
Namespace: TimeCockpit.Data.Localization.Default
Assembly: TimeCockpit.Data.dll
Syntax
public class InvariantFriendlyNameToLocalizationUpgrade
Constructors
InvariantFriendlyNameToLocalizationUpgrade()
Declaration
public InvariantFriendlyNameToLocalizationUpgrade()
Methods
RetrieveLocalization(ModelAction, ActionLocalizer, String)
Retrieves the InvariantFriendlyNames and other localized strings from the action and stores them in the target localier using the targetCulture as a key.
Declaration
public static void RetrieveLocalization(ModelAction action, ActionLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
ModelAction | action | The action to localize. |
ActionLocalizer | targetLocalizer | The target action localizer. |
System.String | targetCulture | The target culture to store as. |
RetrieveLocalization(EntityView, EntityViewLocalizer, String)
Retrieves the InvariantFriendlyNames and other localized strings from the entity view and stores them in the target localizer using the targetCulture.
Declaration
public static void RetrieveLocalization(EntityView entityView, EntityViewLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
EntityView | entityView | The entity view to retrieve localized strings from. |
EntityViewLocalizer | targetLocalizer | The localizer to store the string within. |
System.String | targetCulture | The target culture used as an index to the localizer. |
RetrieveLocalization(Model, DefaultLocalizer, String)
Retrieves the invariant friendly names from the model and stores them in the target localizer using the given target culture.
Declaration
public static void RetrieveLocalization(Model model, DefaultLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
Model | model | The model to retrieve the invariant friendly names from. |
DefaultLocalizer | targetLocalizer | The target localizer to store invariant friendly names to. |
System.String | targetCulture | The target culture to store invariant frienldy names under. |
RetrieveLocalization(ModelEntityBase, EntityLocalizer, String)
Retrieves the InvariantFriendlyNames from the entity and stores them in the target localizer using the given targetCulture.
Declaration
public static void RetrieveLocalization(ModelEntityBase modelEntity, EntityLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
ModelEntityBase | modelEntity | The entity holding the elements with localized properties. |
EntityLocalizer | targetLocalizer | The localizer the localized strings are stored to. |
System.String | targetCulture | The target culture wherein which the strings are saved. |
RetrieveLocalization(ModelProperty, PropertyLocalizer, String)
Retrieves the InvariantFriendlyNames from the property and stores them in the target localizer using the given targetCulture.
Declaration
public static void RetrieveLocalization(ModelProperty property, PropertyLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
ModelProperty | property | The property holding the elements with localized properties. |
PropertyLocalizer | targetLocalizer | The localizer the localized strings are stored to. |
System.String | targetCulture | The target culture wherein which the strings are saved. |
RetrieveLocalization(NamedSetDefinition, NamedSetDefinitionLocalizer, String)
Retrieves the InvariantFriendlyNames and other localized strings from the named set definition.
Declaration
public static void RetrieveLocalization(NamedSetDefinition namedSetDefinition, NamedSetDefinitionLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
NamedSetDefinition | namedSetDefinition | The named set definition to retrieve friendly names from. |
NamedSetDefinitionLocalizer | targetLocalizer | the target localizer to store strings within. |
System.String | targetCulture | The target culture to use. |
RetrieveLocalization(Relation, RelationLocalizer, String)
Retrieves the InvariantFriendlyNames from the relation and stores them in the target localizer using the given targetCulture.
Declaration
public static void RetrieveLocalization(Relation relation, RelationLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
Relation | relation | The relation holding the elements with localized properties. |
RelationLocalizer | targetLocalizer | The localizer the localized strings are stored to. |
System.String | targetCulture | The target culture wherein which the strings are saved. |
RetrieveLocalization(ValidationRule, ValidationRuleLocalizer, String)
Retrieves the InvariantFriendlyNames and Messages from the validationRule and stores them in the target localizer using the given targetCulture.
Declaration
public static void RetrieveLocalization(ValidationRule validationRule, ValidationRuleLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
ValidationRule | validationRule | The validation rule holding the elements with localized properties. |
ValidationRuleLocalizer | targetLocalizer | The localizer the localized strings are stored to. |
System.String | targetCulture | The target culture wherein which the strings are saved. |
RetrieveLocalization(Permission, PermissionLocalizer, String)
Retrieves the InvariantFriendlyNames from the permission and stores them in the target localizer using the given targetCulture.
Declaration
public static void RetrieveLocalization(Permission permission, PermissionLocalizer targetLocalizer, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
Permission | permission | The permission holding the elements with localized properties. |
PermissionLocalizer | targetLocalizer | The localizer the localized strings are stored to. |
System.String | targetCulture | The target culture wherein which the strings are saved. |
RetrieveLocalizationFromModel(Model, String)
Copies the invariant friendly name from the model to the localizer.
Declaration
public static DefaultLocalizer RetrieveLocalizationFromModel(Model model, string targetCulture)
Parameters
Type | Name | Description |
---|---|---|
Model | model | The model to retrieve InvariantFriendlyNames from. |
System.String | targetCulture | The target culture to save to. |
Returns
Type | Description |
---|---|
DefaultLocalizer | Returns a new localizer containing the target localizations. |