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
@@ -142,65 +142,190 @@ The **LocalizedString** element contains the following attributes:
142
142
143
143
| Attribute | Required | Description |
144
144
| --------- | -------- | ----------- |
145
-
| ElementType | Yes | A reference to a claim type element or a user interface element in the policy. Possible values: `ClaimType`, `UxElement`, `ErrorMessage`, `Predicate`, or `GetLocalizedStringsTransformationClaimType`. The `ClaimType` value is used to localize one of the claim attributes, as specified in the StringId. The `UxElement` value is used to localize one of the user interface elements as specified in the StringId. The `ErrorMessage` value is used to localize one of the system error messages as specified in the StringId. The `Predicate` value is used to localize one of the [Predicate](predicates.md) error messages, as specified in the StringId. The `InputValidation` value is used to localize one of the [PredicateValidation](predicates.md) group error messages as specified in the StringId. The `GetLocalizedStringsTransformationClaimType` value is used to copy localized strings into claims. For more information, see [GetLocalizedStringsTransformation claims transformation](string-transformations.md#getlocalizedstringstransformation) |
145
+
| ElementType | Yes | Possible values: [ClaimsProvider](#claimsprovider), [ClaimType](#claimtype), [ErrorMessage](#errormessage), [GetLocalizedStringsTransformationClaimType](#getlocalizedstringstransformationclaimtype), [Predicate](#predicate), [InputValidation](#inputvalidation), or [UxElement](#uxelement). |
146
146
| ElementId | Yes | If **ElementType** is set to `ClaimType`, `Predicate`, or `InputValidation`, this element contains a reference to a claim type already defined in the ClaimsSchema section. |
147
147
| StringId | Yes | If **ElementType** is set to `ClaimType`, this element contains a reference to an attribute of a claim type. Possible values: `DisplayName`, `AdminHelpText`, or `PatternHelpText`. The `DisplayName` value is used to set the claim display name. The `AdminHelpText` value is used to set the help text name of the claim user. The `PatternHelpText` value is used to set the claim pattern help text. If **ElementType** is set to `UxElement`, this element contains a reference to an attribute of a user interface element. If **ElementType** is set to `ErrorMessage`, this element specifies the identifier of an error message. See [Localization string IDs](localization-string-ids.md) for a complete list of the `UxElement` identifiers.|
148
148
149
+
## ElementType
149
150
150
-
The following example shows a localized sign-up page. The first three **LocalizedString** values set the claim attribute. The third changes the value of the continue button. The last one changes the error message.
151
+
The ElementType reference to a claim type, a claim transformation, or a user interface element in the policy to be localized.
<LocalizedStringElementType="ClaimType"ElementId="email"StringId="UserHelpText">Please enter your email</LocalizedString>
157
-
<LocalizedStringElementType="ClaimType"ElementId="email"StringId="PatternHelpText">Please enter a valid email address</LocalizedString>
158
-
<LocalizedStringElementType="UxElement"StringId="button_continue">Create new account</LocalizedString>
159
-
<LocalizedStringElementType="ErrorMessage"StringId="UserMessageIfClaimsPrincipalAlreadyExists">The account you are trying to create already exists, please sign-in.</LocalizedString>
160
-
</LocalizedStrings>
161
-
</LocalizedResources>
153
+
| Element to localize | ElementType | ElementId |StringId |
| Identity provider name |`ClaimsProvider`|| The ID of the ClaimsExchange element|
156
+
| Claim type attributes|`ClaimType`|Name of the claim type| The attribute of the claim to be localized. Possible values: `AdminHelpText`, `DisplayName`, `PatternHelpText`, and `UserHelpText`.|
157
+
|Error message|`ErrorMessage`||The ID of the error message |
158
+
|Copies localized strings into claims|`GetLocalizedStringsTra nsformationClaimType`||The name of the output claim|
159
+
|Predicate user message|`Predicate`|The name of the predicate| The attribute of the predicate to be localized. Possible values: `HelpText`.|
160
+
|Predicate group user message|`InputValidation`|The ID of the PredicateValidation element.|The ID of the PredicateGroup element. The predicate group must be a child of the predicate validation element as defined in the ElementId.|
161
+
|User interface elements |`UxElement`|| The ID of the user interface element to be localized.|
162
+
163
+
## Examples
164
+
165
+
### ClaimsProvider
166
+
167
+
The ClaimsProvider value is used to localize one of the claim providers display name.
The following example shows a localized the **UserHelpText** of **Predicate** with Id `IsLengthBetween8And64`. And a localized **UserHelpText** of **PredicateGroup** with Id `CharacterClasses` of **PredicateValidation** with Id `StrongPassword`.
189
+
### ClaimType
190
+
191
+
The ClaimType value is used to localize one of the claim attributes.
192
+
193
+
```xml
194
+
<ClaimTypeId="email">
195
+
<DisplayName>Email Address</DisplayName>
196
+
<DataType>string</DataType>
197
+
<UserHelpText>Email address that can be used to contact you.</UserHelpText>
198
+
<UserInputType>TextBox</UserInputType>
199
+
</ClaimType>
200
+
```
201
+
202
+
The following example shows how to localize the DisplayName, UserHelpText, and PatternHelpText attributes of the email claim type.
<ItemKey="UserMessageIfClaimsPrincipalAlreadyExists">You are already registered, please press the back button and sign in instead.</Item>
219
+
</Metadata>
179
220
...
180
-
</Predicate>
181
-
...
221
+
</TechnicalProfile>
222
+
```
182
223
224
+
The following example shows how to localize the UserMessageIfClaimsPrincipalAlreadyExists error message.
183
225
184
-
<LocalizedStringElementType="InputValidation"ElementId="StrongPassword"StringId="CharacterClasses">The password must have at least 3 of the following:</LocalizedString>
185
226
186
-
<LocalizedStringElementType="Predicate"ElementId="IsLengthBetween8And64"StringId="HelpText">The password must be between 8 and 64 characters.</LocalizedString>
227
+
```XML
228
+
<LocalizedStringElementType="ErrorMessage"StringId="UserMessageIfClaimsPrincipalAlreadyExists">The account you are trying to create already exists, please sign-in.</LocalizedString>
187
229
```
188
230
189
-
##Set up localization
231
+
### GetLocalizedStringsTransformationClaimType
190
232
191
-
This article shows you how to support multiple locales or languages in the policy for user journeys. Localization requires three steps: set-up the explicit list of the supported languages, provide language-specific strings and collections, and edit the ContentDefinition for the page.
233
+
The GetLocalizedStringsTransformationClaimType value is used to copy localized strings into claims. For more information, see [GetLocalizedStringsTransformation claims transformation](string-transformations.md#getlocalizedstringstransformation)
192
234
193
-
### Set up the explicit list of supported languages
194
235
195
-
Under the **BuildingBlocks** element, add the **Localization** element with the list of supported languages. The following example shows how to define the localization support for both English (default) and Spanish:
<LocalizedStringElementType="InputValidation"ElementId="CustomPassword"StringId="CharacterClasses">The password must have at least 3 of the following:</LocalizedString>
320
+
```
321
+
322
+
### UxElement
323
+
324
+
The UxElement value is used to localize one of the user interface elements. The following example shows how to localize the continue and cancel buttons.
325
+
326
+
```XML
327
+
<LocalizedStringElementType="UxElement"StringId="button_continue">Create new account</LocalizedString>
0 commit comments