Skip to content

Commit dd4b52f

Browse files
committed
More samples
1 parent 551e287 commit dd4b52f

File tree

1 file changed

+60
-18
lines changed

1 file changed

+60
-18
lines changed

articles/active-directory-b2c/localization.md

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,21 @@ The ElementType reference to a claim type, a claim transformation, or a user int
152152

153153
### ClaimsProvider
154154

155-
The ClaimsProvider value is used to localize claim provider name as specified in the StringId.
155+
The ClaimsProvider value is used to localize claim provider name.
156+
157+
- **ElementType** set to `ClaimsProvider`
158+
- **StringId** is the Id of the ClaimsExchange element
156159

157160
```xml
158-
<OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
159-
<ClaimsProviderSelections>
160-
<ClaimsProviderSelection TargetClaimsExchangeId="FacebookExchange" />
161-
<ClaimsProviderSelection TargetClaimsExchangeId="GoogleExchange" />
162-
<ClaimsProviderSelection TargetClaimsExchangeId="LinkedInExchange" />
163-
<ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
164-
</ClaimsProviderSelections>
161+
<OrchestrationStep Order="2" Type="ClaimsExchange">
162+
...
165163
<ClaimsExchanges>
166-
<ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
164+
<ClaimsExchange Id="FacebookExchange" TechnicalProfileReferenceId="Facebook-OAUTH" />
165+
<ClaimsExchange Id="GoogleExchange" TechnicalProfileReferenceId="Google-OAUTH" />
166+
<ClaimsExchange Id="LinkedInExchange" TechnicalProfileReferenceId="LinkedIn-OAUTH" />
167167
</ClaimsExchanges>
168168
</OrchestrationStep>
169+
169170
```
170171

171172
The following example shows how to localize the claim provider name.
@@ -178,7 +179,11 @@ The following example shows how to localize the claim provider name.
178179

179180
### ClaimType
180181

181-
The ClaimType value is used to localize one of the claim attributes, as specified in the StringId.
182+
The ClaimType value is used to localize one of the claim attributes.
183+
184+
- **ElementType** set to `ClaimType`.
185+
- **ElementId** is the name of the claim type.
186+
- **StringId** the attribute of the claim to be localized.
182187

183188
```xml
184189
<ClaimType Id="email">
@@ -189,7 +194,7 @@ The ClaimType value is used to localize one of the claim attributes, as specifie
189194
</ClaimType>
190195
```
191196

192-
The following example shows how to localize the DisplayName, UserHelpText, and PatternHelpText attributes of the email claim type.
197+
The following example shows how to localize the DisplayName, UserHelpText, and PatternHelpText attributes of the email claim type.
193198

194199
```XML
195200
<LocalizedString ElementType="ClaimType" ElementId="email" StringId="DisplayName">Email</LocalizedString>
@@ -199,7 +204,10 @@ The following example shows how to localize the DisplayName, UserHelpText, and
199204

200205
### ErrorMessage
201206

202-
The ErrorMessage value is used to localize one of the system error messages as specified in the StringId.
207+
The ErrorMessage value is used to localize one of the system error messages.
208+
209+
- **ElementType** set to `ErrorMessage`.
210+
- **StringId** the ID of the error message.
203211

204212
```xml
205213
<TechnicalProfile Id="AAD-UserWriteUsingAlternativeSecurityId">
@@ -222,11 +230,36 @@ The following example shows how to localize the UserMessageIfClaimsPrincipalAlre
222230

223231
The `GetLocalizedStringsTransformationClaimType` value is used to copy localized strings into claims. For more information, see [GetLocalizedStringsTransformation claims transformation](string-transformations.md#getlocalizedstringstransformation)
224232

233+
- **ElementType** set to `GetLocalizedStringsTransformationClaimType`.
234+
- **StringId** the name of the output claim.
235+
236+
```xml
237+
<ClaimsTransformation Id="GetLocalizedStringsForEmail" TransformationMethod="GetLocalizedStringsTransformation">
238+
<OutputClaims>
239+
<OutputClaim ClaimTypeReferenceId="subject" TransformationClaimType="email_subject" />
240+
<OutputClaim ClaimTypeReferenceId="message" TransformationClaimType="email_message" />
241+
<OutputClaim ClaimTypeReferenceId="codeIntro" TransformationClaimType="email_code" />
242+
<OutputClaim ClaimTypeReferenceId="signature" TransformationClaimType="email_signature" />
243+
</OutputClaims>
244+
</ClaimsTransformation>
245+
```
246+
247+
The following example shows how to localize the output claims of the GetLocalizedStringsTransformation claims transformation.
248+
249+
```xml
250+
<LocalizedString ElementType="GetLocalizedStringsTransformationClaimType" StringId="email_subject">Contoso account email verification code</LocalizedString>
251+
<LocalizedString ElementType="GetLocalizedStringsTransformationClaimType" StringId="email_message">Thanks for verifying your account!</LocalizedString>
252+
<LocalizedString ElementType="GetLocalizedStringsTransformationClaimType" StringId="email_code">Your code is</LocalizedString>
253+
<LocalizedString ElementType="GetLocalizedStringsTransformationClaimType" StringId="email_signature">Sincerely</LocalizedString>
254+
```
225255

226256
### Predicate
227257

228-
The `Predicate` value is used to localize one of the [Predicate](predicates.md) error messages, as specified in the StringId.
258+
The Predicate value is used to localize one of the [Predicate](predicates.md) error messages.
229259

260+
- **ElementType** set to `Predicate`.
261+
- **ElementId** is the name of the predicate.
262+
- **StringId** the attribute of the predicate to be localized.
230263

231264
```xml
232265
<Predicates>
@@ -249,7 +282,7 @@ The `Predicate` value is used to localize one of the [Predicate](predicates.md)
249282
</Predicates>
250283
```
251284

252-
The following example shows a localized a predicate help text.
285+
The following example shows how to localize the predicate help text.
253286

254287
```xml
255288
<LocalizedString ElementType="Predicate" ElementId="LengthRange" StringId="HelpText">The password must be between 6 and 64 characters.</LocalizedString>
@@ -259,7 +292,11 @@ The following example shows a localized a predicate help text.
259292

260293
### InputValidation
261294

262-
The `InputValidation` value is used to localize one of the [PredicateValidation](predicates.md) group error messages as specified in the StringId.
295+
The `InputValidation` value is used to localize one of the [PredicateValidation](predicates.md) group error messages.
296+
297+
- **ElementType** set to `InputValidation`.
298+
- **ElementId** The ID of the PredicateValidation element.
299+
- **StringId** The ID of the PredicateGroup element. The predicate group must be a child of the predicate validation element as defined in the ElementId.
263300

264301
```xml
265302
<PredicateValidations>
@@ -284,15 +321,20 @@ The `InputValidation` value is used to localize one of the [PredicateValidation]
284321
</PredicateValidations>
285322
```
286323

287-
The following example shows a localized a predicate validation group help text.
324+
The following example shows how to localize the predicate validation group help text.
288325

289326
```XML
290-
<LocalizedString ElementType="InputValidation" ElementId="StrongPassword" StringId="CharacterClasses">The password must have at least 3 of the following:</LocalizedString>
327+
<LocalizedString ElementType="InputValidation" ElementId="CustomPassword" StringId="CharacterClasses">The password must have at least 3 of the following:</LocalizedString>
291328
```
292329

293330
### UxElement
294331

295-
The UxElement value is used to localize one of the user interface elements as specified in the StringId. The following example shows how to localize the continue and cancel buttons.
332+
The UxElement value is used to localize one of the user interface elements.
333+
334+
- **ElementType** set to `UxElement`.
335+
- **StringId** the ID of the user interface element to be localized.
336+
337+
The following example shows how to localize the continue and cancel buttons.
296338

297339
```XML
298340
<LocalizedString ElementType="UxElement" StringId="button_continue">Create new account</LocalizedString>

0 commit comments

Comments
 (0)