Přizpůsobení jazyka v Azure Active Directory B2C

Než začnete, pomocí selektoru Zvolit typ zásady zvolte typ zásady, kterou nastavujete. Azure Active Directory B2C nabízí dvě metody pro definování způsobu interakce uživatelů s vašimi aplikacemi: prostřednictvím předdefinovaných toků uživatelů nebo prostřednictvím plně konfigurovatelných vlastních zásad. Kroky vyžadované v tomto článku se pro každou metodu liší.

Přizpůsobení jazyka v Azure Active Directory B2C (Azure AD B2C) umožňuje vašemu toku uživatelů přizpůsobit různé jazyky podle potřeb zákazníka. Microsoft poskytuje překlady pro 36 jazyků, ale můžete také poskytnout vlastní překlady pro libovolný jazyk. I když je prostředí poskytováno jenom pro jeden jazyk, můžete přizpůsobit libovolný text na stránkách.

Jak funguje přizpůsobení jazyka

Pomocí přizpůsobení jazyka můžete vybrat jazyky, ve kterých je váš tok uživatele dostupný. Po povolení funkce můžete zadat parametr ui_localesřetězce dotazu z vaší aplikace. Při volání do Azure AD B2C se vaše stránka přeloží do národního prostředí, které jste uvedli. Tento typ konfigurace poskytuje úplnou kontrolu nad jazyky v toku uživatele a ignoruje nastavení jazyka prohlížeče zákazníka.

Tuto úroveň kontroly nad jazyky, které vidí zákazník, nemusí být potřeba. Pokud nezadáte ui_locales parametr, prostředí zákazníka se určuje nastavením prohlížeče. Stále můžete určit, do kterých jazyků se tok uživatele přeloží, a to tak, že ho přidáte jako podporovaný jazyk. Pokud je prohlížeč zákazníka nastavený tak, aby zobrazoval jazyk, který nechcete podporovat, zobrazí se místo toho jazyk, který jste vybrali jako výchozí v podporovaných jazykových verzích.

  • Zadaný jazyk uživatelského prostředí: Po povolení přizpůsobení jazyka se tok uživatele přeloží do jazyka, který je zde uvedený.
  • Požadovaný jazyk prohlížeče: Pokud nebyl zadán žádný ui_locales parametr, váš tok uživatele se přeloží do požadovaného jazyka prohlížeče, pokud je jazyk podporovaný.
  • Výchozí jazyk zásad: Pokud prohlížeč neurčí jazyk nebo určuje jazyk, který není podporovaný, přeloží se tok uživatele do výchozího jazyka toku uživatele.

Poznámka:

Pokud používáte vlastní atributy uživatele, musíte zadat vlastní překlady. Další informace naleznete v tématu Přizpůsobení řetězců.

V tomto videu se dozvíte, jak lokalizovat nebo přizpůsobit jazyk pomocí Azure AD B2C.

Lokalizace vyžaduje tři kroky:

  1. Nastavení explicitního seznamu podporovaných jazyků
  2. Zadání řetězců a kolekcí specifických pro jazyk
  3. Upravte definici obsahu stránky.

Předpoklady

Podpora požadovaných jazyků pro ui_locales

Zásady, které byly vytvořeny před obecnou dostupností přizpůsobení jazyka, musí tuto funkci nejprve povolit. Zásady a toky uživatelů vytvořené po povolení přizpůsobení jazyka jsou ve výchozím nastavení povolené.

Když povolíte přizpůsobení jazyka v toku uživatele, můžete řídit jazyk toku uživatele přidáním parametru ui_locales .

  1. V tenantovi Azure AD B2C vyberte Toky uživatelů.
  2. Klikněte na tok uživatele, který chcete povolit pro překlady.
  3. Vyberte jazyky.
  4. Vyberte Povolit přizpůsobení jazyka.

Výběr jazyků v toku uživatele

Povolte sadu jazyků, do které se má tok uživatele přeložit, když ho prohlížeč požaduje bez parametru ui_locales .

  1. Ujistěte se, že váš tok uživatele má povolené přizpůsobení jazyka z předchozích pokynů.
  2. Na stránce Jazyky pro tok uživatele vyberte jazyk, který chcete podporovat.
  3. V podokně vlastností změňte Povoleno na Ano.
  4. V horní části podokna vlastností vyberte Uložit .

Poznámka:

ui_locales Pokud parametr není zadaný, stránka se přeloží do jazyka prohlížeče zákazníka jenom v případě, že je povolená.

Přizpůsobení řetězců

Přizpůsobení jazyka umožňuje přizpůsobit libovolný řetězec v toku uživatele.

  1. Ujistěte se, že váš tok uživatele má povolené přizpůsobení jazyka z předchozích pokynů.
  2. Na stránce Jazyky pro tok uživatele vyberte jazyk, který chcete přizpůsobit.
  3. V části Soubory prostředků na úrovni stránky vyberte stránku, kterou chcete upravit.
  4. Pokud jste tento jazyk upravili dříve, vyberte Možnost Stáhnout výchozí hodnoty (nebo Stáhnout přepsání ).

Tímto postupem získáte soubor JSON, který můžete použít k zahájení úprav řetězců.

Změna libovolného řetězce na stránce

  1. Otevřete soubor JSON stažený z předchozích pokynů v editoru JSON.
  2. Najděte prvek, který chcete změnit. Řetězec, který hledáte, najdete StringId nebo vyhledejte Value atribut, který chcete změnit.
  3. Value Aktualizujte atribut podle toho, co chcete zobrazit.
  4. Pro každý řetězec, který chcete změnit, změňte Override na true.
  5. Uložte soubor a nahrajte změny. (Ovládací prvek pro nahrání najdete na stejném místě, kde jste stáhli soubor JSON.)

Důležité

Pokud potřebujete přepsat řetězec, nezapomeňte nastavit Override hodnotu na true. Pokud se hodnota nezmění, položka se ignoruje.

Změna atributů rozšíření

Pokud chcete změnit řetězec pro vlastní atribut uživatele nebo ho chcete přidat do formátu JSON, je to v následujícím formátu:

{
  "LocalizedStrings": [
    {
      "ElementType": "ClaimType",
      "ElementId": "extension_<ExtensionAttribute>",
      "StringId": "DisplayName",
      "Override": true,
      "Value": "<ExtensionAttributeValue>"
    }
    [...]
  ]
}

Nahraďte <ExtensionAttribute> názvem vlastního atributu uživatele.

Nahraďte <ExtensionAttributeValue> novým řetězcem, který se má zobrazit.

Zadání seznamu hodnot pomocí LocalizedCollections

Pokud chcete zadat seznam hodnot pro odpovědi, musíte vytvořit LocalizedCollections atribut. LocalizedCollections je pole Name a Value dvojice. Pořadí položek bude pořadí, ve kterém jsou zobrazeny. Chcete-li přidat LocalizedCollections, použijte následující formát:

{
  "LocalizedStrings": [...],
  "LocalizedCollections": [
    {
      "ElementType":"ClaimType",
      "ElementId":"<UserAttribute>",
      "TargetCollection":"Restriction",
      "Override": true,
      "Items":[
        {
          "Name":"<Response1>",
          "Value":"<Value1>"
        },
        {
          "Name":"<Response2>",
          "Value":"<Value2>"
        }
      ]
    }
  ]
}
  • ElementId je atribut uživatele, na který tento LocalizedCollections atribut odpovídá.
  • Name je hodnota, která se uživateli zobrazí.
  • Value je to, co se vrátí v deklaraci identity při výběru této možnosti.

Nahrání změn

  1. Po dokončení změn v souboru JSON se vraťte do tenanta B2C.
  2. Vyberte Toky uživatelů a klikněte na tok uživatele, který chcete povolit pro překlady.
  3. Vyberte jazyky.
  4. Vyberte jazyk, na který chcete přeložit.
  5. Vyberte stránku, na které chcete zadat překlady.
  6. Vyberte ikonu složky a vyberte soubor JSON, který chcete nahrát.

Změny se automaticky uloží do toku uživatele.

Přizpůsobení uživatelského rozhraní stránky pomocí přizpůsobení jazyka

Obsah HTML můžete lokalizovat dvěma způsoby. Jedním ze způsobů je zapnout přizpůsobení jazyka. Povolení této funkce umožňuje Službě Azure AD B2C předat parametr ui-localesOpenID Připojení do koncového bodu. Server obsahu může tento parametr použít k poskytování přizpůsobených stránek HTML, které jsou specifické pro jazyk.

Případně můžete načíst obsah z různých míst na základě používaného národního prostředí. V koncovém bodu s podporou CORS můžete nastavit strukturu složek pro hostování obsahu pro konkrétní jazyky. Pokud použijete hodnotu se zástupným znakem, zavoláte tu správnou.{Culture:RFC5646} Předpokládejme například, že se jedná o vlastní identifikátor URI stránky:

https://wingtiptoysb2c.blob.core.windows.net/{Culture:RFC5646}/wingtip/unified.html

Stránku můžete načíst do frsouboru . Když stránka načítá obsah HTML a CSS, načítá se z:

https://wingtiptoysb2c.blob.core.windows.net/fr/wingtip/unified.html

Přidání vlastních jazyků

Můžete také přidat jazyky, pro které Microsoft aktuálně neposkytuje překlady. Budete muset zadat překlady pro všechny řetězce v toku uživatele. Kódy jazyka a národního prostředí jsou omezeny na kódy ve standardu ISO 639-1. Formát kódu národního prostředí by měl být "ISO_639-1_code"-"CountryCode", například en-GB. Další informace najdete ve formátech ID národního prostředí.

  1. V tenantovi Azure AD B2C vyberte Toky uživatelů.
  2. Klikněte na tok uživatele, do kterého chcete přidat vlastní jazyky, a potom klikněte na položku Jazyky.
  3. V horní části stránky vyberte Přidat vlastní jazyk .
  4. V kontextovém podokně, které se otevře, určete, pro který jazyk zadáváte překlady, zadáním platného kódu národního prostředí.
  5. Pro každou stránku si můžete stáhnout sadu přepsání pro angličtinu a pracovat na překladech.
  6. Po dokončení práce se soubory JSON je můžete nahrát pro každou stránku.
  7. Vyberte Povolit a váš tok uživatelů teď může zobrazit tento jazyk pro vaše uživatele.
  8. Uložte jazyk.

Důležité

Před uložením musíte buď povolit vlastní jazyky, nebo pro něj nahrát přepsání.

Nastavení seznamu podporovaných jazyků

Otevřete soubor s příponami zásad. Například, SocialAndLocalAccounts/TrustFrameworkExtensions.xml.

  1. Vyhledejte element BuildingBlocks . Pokud prvek neexistuje, přidejte ho.
  2. Localization Přidejte prvek s podporovanými jazyky: angličtina (výchozí) a španělština.
<Localization Enabled="true">
  <SupportedLanguages DefaultLanguage="en" MergeBehavior="ReplaceAll">
    <SupportedLanguage>en</SupportedLanguage>
    <SupportedLanguage>es</SupportedLanguage>
  </SupportedLanguages>
</Localization>

Zadání popisků specifických pro jazyk

LocalizedResources Localization prvku obsahuje seznam lokalizovaných řetězců. Element lokalizovaných prostředků má identifikátor, který slouží k jedinečné identifikaci lokalizovaných prostředků. Tento identifikátor se používá později v elementu definice obsahu.

Konfigurujete lokalizované prvky prostředků pro definici obsahu a libovolný jazyk, který chcete podporovat. Chcete-li přizpůsobit sjednocené registrační nebo přihlašovací stránky pro angličtinu a španělštinu, přidejte následující LocalizedResources prvky za konec elementu </SupportedLanguages> .

Poznámka:

V následující ukázce jsme na začátek každého řádku přidali symbol libry # , abyste mohli snadno najít lokalizované popisky na obrazovce.

<!--Local account sign-up or sign-in page English-->
<Localization Enabled="true">
  ...
 <LocalizedResources Id="api.signuporsignin.en">
        <LocalizedStrings>
          <LocalizedString ElementType="ClaimType" ElementId="signInName" StringId="DisplayName">Email Address</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="heading">Sign in</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="social_intro">Sign in with your social account</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="local_intro_generic">Sign in with your {0}</LocalizedString>
          <LocalizedString ElementType="ClaimType" ElementId="password" StringId="DisplayName">Password</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="requiredField_password">Please enter your password</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="requiredField_generic">Please enter your {0}</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="invalid_generic">Please enter a valid {0}</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="createaccount_one_link">Sign up now</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="createaccount_two_links">Sign up with {0} or {1}</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="createaccount_three_links">Sign up with {0}, {1}, or {2}</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="forgotpassword_link">Forgot your password?</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="button_signin">Sign in</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="divider_title">OR</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="createaccount_intro">Don't have an account?</LocalizedString>
          <LocalizedString ElementType="UxElement" StringId="unknown_error">We are having trouble signing you in. Please try again later.</LocalizedString>
          <!-- Uncomment the remember_me only if the keep me signed in is activated. 
          <LocalizedString ElementType="UxElement" StringId="remember_me">Keep me signed in</LocalizedString> -->
          <LocalizedString ElementType="ClaimsProvider" StringId="FacebookExchange">Facebook</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="ResourceOwnerFlowInvalidCredentials">Your password is incorrect.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfInvalidPassword">Your password is incorrect.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfPasswordExpired">Your password has expired.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">We can't seem to find your account.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfOldPasswordUsed">Looks like you used an old password.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="DefaultMessage">Invalid username or password.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfUserAccountDisabled">Your account has been locked. Contact your support person to unlock it, then try again.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfUserAccountLocked">Your account is temporarily locked to prevent unauthorized use. Try again later.</LocalizedString>
          <LocalizedString ElementType="ErrorMessage" StringId="AADRequestsThrottled">There are too many requests at this moment. Please wait for some time and try again.</LocalizedString>
        </LocalizedStrings>
      </LocalizedResources>
  <!--Local account sign-up or sign-in page Spanish-->
  <LocalizedResources Id="api.signuporsignin.es">
    <LocalizedStrings>
      <LocalizedString ElementType="UxElement" StringId="logonIdentifier_email">#Correo electrónico</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="requiredField_email">#Este campo es obligatorio</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="logonIdentifier_username">#Nombre de usuario</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="password">#Contraseña</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="createaccount_link">#Registrarse ahora</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="requiredField_username">#Escriba su nombre de usuario</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="createaccount_intro">#¿No tiene una cuenta?</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="forgotpassword_link">#¿Olvidó su contraseña?</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="divider_title">#O</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="cancel_message">#El usuario ha olvidado su contraseña</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="button_signin">#Iniciar sesión</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="social_intro">#Iniciar sesión con su cuenta de redes sociales</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="requiredField_password">#Escriba su contraseña</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="invalid_password">#La contraseña que ha escrito no está en el formato esperado.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="local_intro_username">#Iniciar sesión con su nombre de usuario</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="local_intro_email">#Iniciar sesión con su cuenta existente</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="invalid_email">#Escriba una dirección de correo electrónico válida</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="unknown_error">#Tenemos problemas para iniciar su sesión. Vuelva a intentarlo más tarde.  </LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="email_pattern">^[a-zA-Z0-9.!#$%&amp;'^_`\{\}~\-]+@[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>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfOldPasswordUsed">#Parece que ha usado una contraseña antigua.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="DefaultMessage">#El nombre de usuario o la contraseña no son válidos.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfUserAccountDisabled">#Se bloqueó su cuenta. Póngase en contacto con la persona responsable de soporte técnico para desbloquearla y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfUserAccountLocked">#Su cuenta se bloqueó temporalmente para impedir un uso no autorizado. Vuelva a intentarlo más tarde.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="AADRequestsThrottled">#Hay demasiadas solicitudes en este momento. Espere un momento y vuelva a intentarlo.</LocalizedString>
    </LocalizedStrings>
  </LocalizedResources>
  <!--Local account sign-up page English-->
  <LocalizedResources Id="api.localaccountsignup.en">
    <LocalizedStrings>
      <LocalizedString ElementType="ClaimType" ElementId="email" StringId="DisplayName">#Email Address</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="email" StringId="UserHelpText">#Email address that can be used to contact you.</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="email" StringId="PatternHelpText">#Please enter a valid email address.</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="newPassword" StringId="DisplayName">#New Password</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="newPassword" StringId="UserHelpText">#Enter new password</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="newPassword" StringId="PatternHelpText">#8-16 characters, containing 3 out of 4 of the following: Lowercase characters, uppercase characters, digits (0-9), and one or more of the following symbols: @ # $ % ^ &amp; * - _ + = [ ] { } | \ : ' , ? / ` ~ " ( ) ; .</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="reenterPassword" StringId="DisplayName">#Confirm New Password</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="reenterPassword" StringId="UserHelpText">#Confirm new password</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="reenterPassword" StringId="PatternHelpText">#8-16 characters, containing 3 out of 4 of the following: Lowercase characters, uppercase characters, digits (0-9), and one or more of the following symbols: @ # $ % ^ &amp; * - _ + = [ ] { } | \ : ' , ? / ` ~ " ( ) ; .</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="displayName" StringId="DisplayName">#Display Name</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="displayName" StringId="UserHelpText">#Your display name.</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="surname" StringId="DisplayName">#Surname</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="surname" StringId="UserHelpText">#Your surname (also known as family name or last name).  </LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="DisplayName">#Given Name</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="UserHelpText">#Your given name (also known as first name).</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="button_continue">#Create</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="error_fieldIncorrect">#One or more fields are filled out incorrectly. Please check your entries and try again.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="error_passwordEntryMismatch">#The password entry fields do not match. Please enter the same password in both fields and try again.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="error_requiredFieldMissing">#A required field is missing. Please fill out all required fields and try again.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="helplink_text">#What is this?</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="initial_intro">#Please provide the following details.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="preloader_alt">#Please wait</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="required_field">#This information is required.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_edit">#Change e-mail</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_resend">#Send new code</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_send">#Send verification code</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_verify">#Verify code</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_code_expired">#That code is expired. Please request a new code.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_no_retry">#You've made too many incorrect attempts. Please try again later.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_retry">#That code is incorrect. Please try again.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_server">#We are having trouble verifying your email address. Please enter a valid email address and try again.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_throttled">#There have been too many requests to verify this email address. Please wait a while, then try again.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_info_msg">#Verification code has been sent to your inbox. Please copy it to the input box below.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_input">#Verification code</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_intro_msg">#Verification is necessary. Please click Send button.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_success_msg">#E-mail address verified. You can now continue.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="ServiceThrottled">#There are too many requests at this moment. Please wait for some time and try again.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimNotVerified">#Claim not verified: {0}</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalAlreadyExists">#A user with the specified ID already exists. Please choose a different one.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfIncorrectPattern">#Incorrect pattern for: {0}</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfInvalidInput">#{0} has invalid input.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfMissingRequiredElement">#Missing required element: {0}</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfValidationError">#Error in validation by: {0}</LocalizedString>
    </LocalizedStrings>
  </LocalizedResources>
  <!--Local account sign-up page Spanish-->
  <LocalizedResources Id="api.localaccountsignup.es">
    <LocalizedStrings>
      <LocalizedString ElementType="ClaimType" ElementId="email" StringId="DisplayName">#Dirección de correo electrónico</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="email" StringId="UserHelpText">#Dirección de correo electrónico que puede usarse para ponerse en contacto con usted.</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="email" StringId="PatternHelpText">#Introduzca una dirección de correo electrónico válida.  </LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="newPassword" StringId="DisplayName">#Nueva contraseña</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="newPassword" StringId="UserHelpText">#Escriba la contraseña nueva</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="newPassword" StringId="PatternHelpText">#De 8 a 16 caracteres, que contengan 3 de los 4 tipos siguientes: caracteres en minúsculas, caracteres en mayúsculas, dígitos (0-9) y uno o más de los siguientes símbolos: @ # $ % ^ &amp; * - _ + = [ ] { } | \\ : ' , ? / ` ~ \" ( ) ; .</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="reenterPassword" StringId="DisplayName">#Confirmar nueva contraseña</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="reenterPassword" StringId="UserHelpText">#Confirmar nueva contraseña</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="reenterPassword" StringId="PatternHelpText">#8 a 16 caracteres, que contengan 3 de los 4 tipos siguientes: caracteres en minúsculas, caracteres en mayúsculas, dígitos (0-9) y uno o más de los siguientes símbolos: @ # $ % ^ &amp; * - _ + = [ ] { } | \\ : ' , ? / ` ~ \" ( ) ; .</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="displayName" StringId="DisplayName">#Nombre para mostrar</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="displayName" StringId="UserHelpText">#Su nombre para mostrar.</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="surname" StringId="DisplayName">#Apellido</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="surname" StringId="UserHelpText">#Su apellido.</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="DisplayName">#Nombre</LocalizedString>
      <LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="UserHelpText">#Su nombre (también conocido como nombre de pila).</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="button_continue">#Crear</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="error_fieldIncorrect">#Hay uno o varios campos rellenados de forma incorrecta. Compruebe las entradas y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="error_passwordEntryMismatch">#Los campos de entrada de contraseña no coinciden. Escriba la misma contraseña en ambos campos y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="error_requiredFieldMissing">#Falta un campo obligatorio. Rellene todos los campos necesarios y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="helplink_text">#¿Qué es esto?</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="initial_intro">#Proporcione los siguientes detalles.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="preloader_alt">#Espere</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="required_field">#Esta información es obligatoria.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_edit">#Cambiar correo electrónico</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_resend">#Enviar nuevo código</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_send">#Enviar código de comprobación</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_but_verify">#Comprobar código</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_code_expired">#El código ha expirado. Solicite otro nuevo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_no_retry">#Ha realizado demasiados intentos incorrectos. Vuelva a intentarlo más tarde.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_retry">#Ese código es incorrecto. Inténtelo de nuevo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_server">#Tenemos problemas para comprobar la dirección de correo electrónico. Escriba una dirección de correo electrónico válida y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_fail_throttled">#Ha habido demasiadas solicitudes para comprobar esta dirección de correo electrónico. Espere un poco y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_info_msg">#Se ha enviado el código de verificación a su Bandeja de entrada. Cópielo en el siguiente cuadro de entrada.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_input">#Código de verificación</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_intro_msg">#La comprobación es obligatoria. Haga clic en el botón Enviar.</LocalizedString>
      <LocalizedString ElementType="UxElement" StringId="ver_success_msg">#Dirección de correo electrónico comprobada. Puede continuar.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="ServiceThrottled">#Hay demasiadas solicitudes en este momento. Espere un momento y vuelva a intentarlo.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimNotVerified">#Reclamación no comprobada: {0}</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalAlreadyExists">#Ya existe un usuario con el id. especificado. Elija otro diferente.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfIncorrectPattern">#Patrón incorrecto para: {0}</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfInvalidInput">#{0} tiene una entrada no válida.</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfMissingRequiredElement">#Falta un elemento obligatorio: {0}</LocalizedString>
      <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfValidationError">#Error en la validación de: {0}</LocalizedString>
    </LocalizedStrings>
  </LocalizedResources>
</Localization>

Úprava definice obsahu s lokalizací

Vložte celý obsah ContentDefinitions elementu, který jste zkopírovali jako podřízený prvek BuildingBlocks.

V následujícím příkladu se na registrační stránku nebo přihlašovací stránku přidají vlastní řetězce pro angličtinu (en) a španělštinu (es). LocalizedResourcesReferenceId pro každý LocalizedResourcesReference je stejný jako národní prostředí, ale jako identifikátor můžete použít libovolný řetězec. Pro každou kombinaci jazyků a stránek odkazujete na odpovídající lokalizované zdroje , které jste vytvořili dříve.

<ContentDefinitions>
  <ContentDefinition Id="api.signuporsignin">
    <LocalizedResourcesReferences MergeBehavior="Prepend">
        <LocalizedResourcesReference Language="en" LocalizedResourcesReferenceId="api.signuporsignin.en" />
        <LocalizedResourcesReference Language="es" LocalizedResourcesReferenceId="api.signuporsignin.es" />
    </LocalizedResourcesReferences>
  </ContentDefinition>

  <ContentDefinition Id="api.localaccountsignup">
    <LocalizedResourcesReferences MergeBehavior="Prepend">
        <LocalizedResourcesReference Language="en" LocalizedResourcesReferenceId="api.localaccountsignup.en" />
        <LocalizedResourcesReference Language="es" LocalizedResourcesReferenceId="api.localaccountsignup.es" />
    </LocalizedResourcesReferences>
  </ContentDefinition>
</ContentDefinitions>

Nahrání a otestování aktualizovaných vlastních zásad

Nahrání vlastních zásad

  1. Uložte soubor s příponami.
  2. Pokud máte přístup k více tenantům, v horní nabídce vyberte ikonu Nastavení a v nabídce Adresáře a předplatná přepněte do svého tenanta Azure AD B2C.
  3. Vyhledejte a vyberte Azure AD B2C.
  4. V části Zásady vyberte Architekturu prostředí identit.
  5. Vyberte Nahrát vlastní zásady.
  6. Nahrajte soubor přípon, který jste předtím změnili.

Otestování vlastních zásad pomocí příkazu Spustit

  1. Vyberte zásadu, kterou jste nahráli, a pak vyberte Spustit.
  2. Měla by se zobrazit lokalizovaná přihlašovací stránka nebo přihlašovací stránka.
  3. Klikněte na odkaz pro registraci a měli byste být schopni zobrazit lokalizovanou registrační stránku.
  4. Přepněte výchozí jazyk prohlížeče na španělštinu. Nebo můžete do žádosti o autorizaci přidat parametr ui_locales řetězce dotazu. Příklad:
https://<tenant-name>.b2clogin.com/<tenant-name>.onmicrosoft.com/B2C_1A_signup_signin/oauth2/v2.0/authorize&client_id=0239a9cc-309c-4d41-12f1-31299feb2e82&nonce=defaultNonce&redirect_uri=https%3A%2F%2Fjwt.ms&scope=openid&response_type=id_token&prompt=login&ui_locales=es

Další informace

Popisky přizpůsobení uživatelského rozhraní stránky jako přepsání

Když povolíte přizpůsobení jazyka, předchozí úpravy popisků pomocí přizpůsobení uživatelského rozhraní stránky se zachovají v souboru JSON pro angličtinu (en). Popisky a další řetězce můžete i nadále měnit tak, že v přizpůsobení jazyka nahrajete jazykové prostředky.

Aktuální překlady

Společnost Microsoft se zavazuje poskytovat nejaktuálnější překlady pro vaše použití. Microsoft průběžně vylepšuje překlady a udržuje je v souladu s předpisy. Microsoft identifikuje chyby a změny v globální terminologii a provede aktualizace, které budou bezproblémově fungovat ve vašem toku uživatele.

Podpora jazyků se zprava doleva

Microsoft v současné době nepodporuje jazyky se zprava doleva. Toho můžete dosáhnout pomocí vlastních národních prostředí a pomocí šablon stylů CSS změnit způsob zobrazení řetězců. Pokud tuto funkci potřebujete, hlasujte pro ni ve zpětné vazbě k Azure.

Překlady zprostředkovatele sociálních identit

Microsoft poskytuje ui_locales parametr OIDC pro přihlášení na sociálních sítích. Někteří poskytovatelé sociálních identit, včetně Facebooku a Googlu, je ale nedotknou.

Chování prohlížeče

Chrome i Firefox si vyžádají svůj nastavený jazyk. Pokud se jedná o podporovaný jazyk, zobrazí se před výchozím nastavením. Microsoft Edge v současné době nevyžaduje jazyk a přejde přímo do výchozího jazyka.

Podporované jazyky

Azure AD B2C zahrnuje podporu následujících jazyků pomocí kódů ISO 639-1. Jazyky toku uživatelů poskytuje Azure AD B2C. Vícefaktorové jazyky oznámení ověřování poskytuje vícefaktorové ověřování Microsoft Entra.

Jazyk Kód jazyka Toky uživatele Oznámení vícefaktorového ověřování
Arabština ar X indicating no. Green check mark.
Bulharština bg X indicating no. Green check mark.
Bangla Bn Green check mark. X indicating no.
Katalánština ca X indicating no. Green check mark.
Čeština cs Green check mark. Green check mark.
Dánština da Green check mark. Green check mark.
Němčina de Green check mark. Green check mark.
Řečtina el Green check mark. Green check mark.
English en Green check mark. Green check mark.
Španělština es Green check mark. Green check mark.
Estonština et X indicating no. Green check mark.
Baskičtina eu X indicating no. Green check mark.
Finština fi Green check mark. Green check mark.
Francouzština fr Green check mark. Green check mark.
Galicijština gl X indicating no. Green check mark.
Gudžarátština Gu Green check mark. X indicating no.
Hebrejština he X indicating no. Green check mark.
Hindština hi Green check mark. Green check mark.
Chorvatština hod. Green check mark. Green check mark.
Maďarština hu Green check mark. Green check mark.
Indonéština id X indicating no. Green check mark.
Italština to Green check mark. Green check mark.
japonština ja Green check mark. Green check mark.
Kazaština kk X indicating no. Green check mark.
Kannadština kn Green check mark. X indicating no.
Korejština ko Green check mark. Green check mark.
Litevština lt X indicating no. Green check mark.
Lotyština lv X indicating no. Green check mark.
Malajalámština ml Green check mark. X indicating no.
Maráthština Pan Green check mark. X indicating no.
Malajština ms Green check mark. Green check mark.
Norština Bokmal nb Green check mark. X indicating no.
Nizozemština nl Green check mark. Green check mark.
Norština ne X indicating no. Green check mark.
Paňdžábština Pa Green check mark. X indicating no.
Polština pl Green check mark. Green check mark.
Portugalština – Brazílie pt-br Green check mark. Green check mark.
Portugalština – Portugalsko pt-pt Green check mark. Green check mark.
Rumunština ro Green check mark. Green check mark.
Ruština ru Green check mark. Green check mark.
Slovenština sk Green check mark. Green check mark.
Slovinština sl X indicating no. Green check mark.
Srbština – cyrilice sr-cryl-cs X indicating no. Green check mark.
Srbština – latinka sr-latn-cs X indicating no. Green check mark.
Švédština sv Green check mark. Green check mark.
Tamilština ta Green check mark. X indicating no.
Telugština te Green check mark. X indicating no.
Thajština th Green check mark. Green check mark.
Turečtina tr Green check mark. Green check mark.
Ukrajinština uk X indicating no. Green check mark.
Vietnamština vi X indicating no. Green check mark.
Velština Cy X indicating no. X indicating no.
Čínština – zjednodušená zh-hans Green check mark. Green check mark.
Čínština – tradiční zh-hant Green check mark. Green check mark.

Další kroky

Další informace o tom, jak můžete přizpůsobit uživatelské rozhraní aplikací, najdete v tématu Přizpůsobení uživatelského rozhraní aplikace v Azure Active Directory B2C.

  • Přečtěte si další informace o elementu lokalizace v referenčních informacích IEF.
  • Podívejte se na seznam ID lokalizačních řetězců dostupných v Azure AD B2C.