Skip to content

Commit 6dc8e0a

Browse files
authored
1 parent c88e84d commit 6dc8e0a

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

articles/active-directory-b2c/localization.md

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: celestedg
88
ms.service: active-directory
99
ms.workload: identity
1010
ms.topic: reference
11-
ms.date: 03/11/2020
11+
ms.date: 04/06/2020
1212
ms.author: mimart
1313
ms.subservice: B2C
1414
---
@@ -142,25 +142,45 @@ The **LocalizedString** element contains the following attributes:
142142

143143
| Attribute | Required | Description |
144144
| --------- | -------- | ----------- |
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`. |
146146
| 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. |
147147
| 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.|
148148

149+
## ElementType
149150

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.
151156

152157
```XML
153-
<LocalizedResources Id="api.selfasserted.en">
154-
<LocalizedStrings>
155-
<LocalizedString ElementType="ClaimType" ElementId="email" StringId="DisplayName">Email</LocalizedString>
156-
<LocalizedString ElementType="ClaimType" ElementId="email" StringId="UserHelpText">Please enter your email</LocalizedString>
157-
<LocalizedString ElementType="ClaimType" ElementId="email" StringId="PatternHelpText">Please enter a valid email address</LocalizedString>
158-
<LocalizedString ElementType="UxElement" StringId="button_continue">Create new account</LocalizedString>
159-
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalAlreadyExists">The account you are trying to create already exists, please sign-in.</LocalizedString>
160-
</LocalizedStrings>
161-
</LocalizedResources>
158+
<LocalizedString ElementType="ClaimType" ElementId="email" StringId="DisplayName">Email</LocalizedString>
159+
<LocalizedString ElementType="ClaimType" ElementId="email" StringId="UserHelpText">Please enter your email</LocalizedString>
160+
<LocalizedString ElementType="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+
<LocalizedString ElementType="UxElement" StringId="button_continue">Create new account</LocalizedString>
169+
<LocalizedString ElementType="UxElement" StringId="button_cancel">Cancel</LocalizedString>
170+
```
171+
172+
### ErrorMessage
173+
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+
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalAlreadyExists">The account you are trying to create already exists, please sign-in.</LocalizedString>
177+
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">We can't seem to find your account.</LocalizedString>
162178
```
163179

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+
164184
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`.
165185

166186
```XML
@@ -186,22 +206,11 @@ The following example shows a localized the **UserHelpText** of **Predicate** wi
186206
<LocalizedString ElementType="Predicate" ElementId="IsLengthBetween8And64" StringId="HelpText">The password must be between 8 and 64 characters.</LocalizedString>
187207
```
188208

189-
## Set up localization
209+
### GetLocalizedStringsTransformationClaimType
190210

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)
192212

193-
### Set up the explicit list of supported languages
194213

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:
196-
197-
```XML
198-
<Localization Enabled="true">
199-
<SupportedLanguages DefaultLanguage="en" MergeBehavior="ReplaceAll">
200-
<SupportedLanguage>en</SupportedLanguage>
201-
<SupportedLanguage>es</SupportedLanguage>
202-
</SupportedLanguages>
203-
</Localization>
204-
```
205214

206215
## Next steps
207216

0 commit comments

Comments
 (0)