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
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/localization.md
+34-25Lines changed: 34 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: celestedg
8
8
ms.service: active-directory
9
9
ms.workload: identity
10
10
ms.topic: reference
11
-
ms.date: 03/11/2020
11
+
ms.date: 04/06/2020
12
12
ms.author: mimart
13
13
ms.subservice: B2C
14
14
---
@@ -142,25 +142,45 @@ 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: `ClaimType`, `UxElement`, `ErrorMessage`, `Predicate`, or `GetLocalizedStringsTransformationClaimType`. |
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 or a user interface element in the policy to be localized.
152
+
153
+
### ClaimType
154
+
155
+
The ClaimType value is used to localize one of the claim attributes, as specified in the StringId. The following example shows how to localized the DisplayName, UserHelpText and PatternHelpText attributes of the email claim type.
<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>
<LocalizedStringElementType="ClaimType"ElementId="email"StringId="UserHelpText">Please enter your email</LocalizedString>
160
+
<LocalizedStringElementType="ClaimType"ElementId="email"StringId="PatternHelpText">Please enter a valid email address</LocalizedString>
161
+
```
162
+
163
+
### UxElement
164
+
165
+
The UxElement value is used to localize one of the user interface elements as specified in the StringId. The following example shows how to localized the continue and cancel buttonn.
166
+
167
+
```XML
168
+
<LocalizedStringElementType="UxElement"StringId="button_continue">Create new account</LocalizedString>
The ErrorMessage value is used to localize one of the system error messages as specified in the StringId. The following example shows how to localized the UserMessageIfClaimsPrincipalAlreadyExists UserMessageIfClaimsPrincipalDoesNotExist and error messages.
174
+
175
+
```XML
176
+
<LocalizedStringElementType="ErrorMessage"StringId="UserMessageIfClaimsPrincipalAlreadyExists">The account you are trying to create already exists, please sign-in.</LocalizedString>
177
+
<LocalizedStringElementType="ErrorMessage"StringId="UserMessageIfClaimsPrincipalDoesNotExist">We can't seem to find your account.</LocalizedString>
162
178
```
163
179
180
+
### Predicate
181
+
182
+
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.
183
+
164
184
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`.
165
185
166
186
```XML
@@ -186,22 +206,11 @@ The following example shows a localized the **UserHelpText** of **Predicate** wi
186
206
<LocalizedStringElementType="Predicate"ElementId="IsLengthBetween8And64"StringId="HelpText">The password must be between 8 and 64 characters.</LocalizedString>
187
207
```
188
208
189
-
##Set up localization
209
+
### GetLocalizedStringsTransformationClaimType
190
210
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.
211
+
The `GetLocalizedStringsTransformationClaimType` value is used to copy localized strings into claims. For more information, see [GetLocalizedStringsTransformation claims transformation](string-transformations.md#getlocalizedstringstransformation)
192
212
193
-
### Set up the explicit list of supported languages
194
213
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:
0 commit comments