我通过对XXX_TrustFrameworkExtensions文件进行以下更改来实现本地化。
此LocalizedResources是否可以外部化?任何帮助将不胜感激。
<BuildingBlocks>
<ContentDefinitions>
<ContentDefinition Id="api.signuporsignin">
<LocalizedResourcesReferences MergeBehavior="Prepend">
<LocalizedResourcesReference Language="en-US" LocalizedResourcesReferenceId="en-US"/>
<LocalizedResourcesReference Language="es-MX" LocalizedResourcesReferenceId="es-MX"/>
</LocalizedResourcesReferences>
</ContentDefinition>
</ContentDefinitions>
<Localization Enabled="true">
<SupportedLanguages DefaultLanguage="en-US" MergeBehavior="ReplaceAll">
<SupportedLanguage>en-US</SupportedLanguage>
<SupportedLanguage>es-MX</SupportedLanguage>
</SupportedLanguages>
<LocalizedResources Id="en-US">
<LocalizedStrings>
<LocalizedString ElementType="UxElement" StringId="logonIdentifier_email">#Email Address</LocalizedString>
<LocalizedString ElementType="UxElement" StringId="password">#Password</LocalizedString>
<LocalizedString ElementType="UxElement" StringId="email_pattern">^[a-zA-Z0-9.!#$%&'^_`{}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$</LocalizedString>
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfInvalidPassword">#Your password is incorrect.</LocalizedString>
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">#We can't seem to find your account.</LocalizedString>
</LocalizedStrings>
</LocalizedResources>
<LocalizedResources Id="es-MX">
<LocalizedStrings>
<LocalizedString ElementType="UxElement" StringId="logonIdentifier_email">#Correo electrónico</LocalizedString>
<LocalizedString ElementType="UxElement" StringId="password">#Contraseña</LocalizedString>
<LocalizedString ElementType="UxElement" StringId="email_pattern">^[a-zA-Z0-9.!#$%&'^_`{}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$</LocalizedString>
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfInvalidPassword">#Su contraseña es incorrecta.</LocalizedString>
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">#Parece que no podemos encontrar su cuenta.</LocalizedString>
</LocalizedStrings>
</LocalizedResources>
</Localization>
</BuildingBlocks>
答案 0 :(得分:0)
当前本地化的资源无法移动到单独的文件/已外部化。