You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, only fields can be made translatable.
If we use the same type, for example RiskClass, for several fields of our Schema, we need to put the Translate directive on every one of these fields:
public class Employee
{
[Translate<RiskClass>(resourceKeyPrefix: "RiskClasses")]
public RiskClass RiskClass{ get; }
}
public class ChemicalCompound
{
[Translate<RiskClass>(resourceKeyPrefix: "RiskClasses")]
public RiskClass RiskClass{ get; }
}
public class FinancialAsset
{
[Translate<RiskClass>(resourceKeyPrefix: "RiskClasses")]
public RiskClass RiskClass{ get; }
}
It would be neat to instead be able to translate and/or rewrite the type RiskClass globally, so that we only need to use the Translate Attribute once:
[Translate<RiskClass>(resourceKeyPrefix: "RiskClasses")]
public enum RiskClass
{
Low,
Medium,
High,
}
This would then rewrite every field of type RiskClass to a TranslatedResourceOfRiskClass.
Support for the translatable and translated patterns would also be appreciated.
The text was updated successfully, but these errors were encountered:
Currently, only fields can be made translatable.
If we use the same type, for example
RiskClass
, for several fields of our Schema, we need to put theTranslate
directive on every one of these fields:It would be neat to instead be able to translate and/or rewrite the type RiskClass globally, so that we only need to use the
Translate
Attribute once:This would then rewrite every field of type
RiskClass
to aTranslatedResourceOfRiskClass
.Support for the
translatable
andtranslated
patterns would also be appreciated.The text was updated successfully, but these errors were encountered: