> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Flexible Language Selection

> Learn how you can add a preferred language menu to Universal Login prompts. 

export const AuthCodeGroup = ({children, dropdown}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        const processChildren = node => {
          if (typeof node === "string") {
            let processedNode = node;
            for (const [key, value] of window.rootStore.variableStore.values.entries()) {
              processedNode = processedNode.replace(new RegExp(key, "g"), value);
            }
            return processedNode;
          } else if (Array.isArray(node)) {
            return node.map(processChildren);
          } else if (node && node.props && node.props.children) {
            return {
              ...node,
              props: {
                ...node.props,
                children: processChildren(node.props.children)
              }
            };
          }
          return node;
        };
        setProcessedChildren(processChildren(children));
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeGroup dropdown={dropdown}>{processedChildren}</CodeGroup>;
};

export const AuthCodeBlock = ({filename, icon, language, highlight, children}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        let processedChildren = children;
        for (const [key, value] of window.rootStore.variableStore.values.entries()) {
          processedChildren = processedChildren.replace(new RegExp(key, "g"), value);
        }
        setProcessedChildren(processedChildren);
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeBlock filename={filename} icon={icon} language={language} lines highlight={highlight}>
      {processedChildren}
    </CodeBlock>;
};

Flexible language selection is an optional feature that allows users to select their preferred language on <Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=universal-login" tip="ユニバーサルログイン: アプリケーションは、Auth0の認可サーバーでホストされているユニバーサルログインにリダイレクトして、ユーザーのアイデンティティを確認します。" cta="用語集の表示">Universal Login</Tooltip> prompts associated with your application, such as the login screen. You can configure this feature individually for different Universal Login prompts.

After implementing this feature for a specific prompt, a language selection menu is added to the associated screen. Users can choose a preferred language from this menu to automatically render the prompt in that language.

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/TAtXfl0iCCUYtXZs/docs/images/ja-jp/cdy7uua7fh8z/4Z5pt3aH3vpRRYV0RDDnba/dc7a5abc8ee2cb462b2be4b43490393c/Language_Selector_Prompts.png?fit=max&auto=format&n=TAtXfl0iCCUYtXZs&q=85&s=6438e2f88c7728d2743e1d4eea47f409" alt="Two Universal Login prompts showing the language selection menu. " width="982" height="636" data-path="docs/images/ja-jp/cdy7uua7fh8z/4Z5pt3aH3vpRRYV0RDDnba/dc7a5abc8ee2cb462b2be4b43490393c/Language_Selector_Prompts.png" />
</Frame>

<div id="before-you-begin">
  ## Before you begin
</div>

Before you can implement flexible language selection, ensure the following requirements are met:

* Use [Universal Login](/docs/ja-JP/ja-jp/authenticate/login/auth0-universal-login).

  * This feature is not available for custom login pages.
* Configure a [custom domain](/docs/ja-JP/ja-jp/customize/custom-domains).
* Enable the languages you plan to add to your prompts in your Auth0 tenant.

  * On the Auth0 Dashboard, navigate to [Settings > General > Languages](https://manage.auth0.com/#/tenant/general) and enable one or more desired languages.

    * For more information, review [Universal Login Internationalization](/docs/ja-JP/ja-jp/customize/internationalization-and-localization/universal-login-internationalization).

<div id="implement-flexible-language-selection">
  ## Implement flexible language selection
</div>

Setting up flexible language selection includes two primary steps:

1. Preparing your page template to facilitate language selection.
2. Configuring individual prompts to display language selection to users.

<div id="prepare-your-universal-login-page-template">
  ### Prepare your Universal Login page template
</div>

To get started, add the following script to your [Universal Login page template](/docs/ja-JP/ja-jp/customize/login-pages/universal-login/customize-templates) to facilitate language selection.

```html lines theme={null}
<script>
  function updateSelectedLanguage() {
    const selectElement = document.getElementById('\''language'\'');
    const selectedValue = selectElement.value;
    const options = selectElement.options;
    for (let i = 0; i < options.length; i++) {
      if (options[i].value === selectedValue) {
        options[i].selected = true;
      } else {
        options[i].selected = false;
      }
    }
    document.getElementById('\''changeLanguage'\'').click();
  }
</script>
```

This script enables Universal Login prompts to render a dynamic language selection menu. Users can access this menu to apply their preferred language to a configured prompt.

To add this script to your page template, use the [Set Template for Universal Login](https://auth0.com/docs/api/management/v2/branding/put-universal-login) endpoint.

<Warning>
  Be aware that this call will **overwrite any existing configurations** you have made to your Universal Login page template. To avoid any disruptions, ensure you include all necessary page template customizations in this call.
</Warning>

<AuthCodeGroup>
  ````bash cURL theme={null}
  curl --request PUT \
  --url 'https://{yourDomain}/api/v2/branding/templates/universal-login' \
  --header 'authorization: Bearer MANAGEMENT_API_TOKEN' \
  --header 'content-type: text/html' \
  --data '

  {%- auth0:head -%}
  {%- auth0:widget -%}
  '
  ``` lines
  ```csharp C#
  var client = new RestClient("https://{yourDomain}/api/v2/branding/templates/universal-login");
  var request = new RestRequest(Method.PUT);
  request.AddHeader("content-type", "text/html");
  request.AddHeader("authorization", "Bearer MANAGEMENT_API_TOKEN");
  request.AddParameter("text/html", "

  {%- auth0:head -%}
  {%- auth0:widget -%}
  ", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ````

  ````go Go theme={null}
  package main
  import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
  )
  func main() {
  url := "https://{yourDomain}/api/v2/branding/templates/universal-login"
  payload := strings.NewReader("

  {%- auth0:head -%}
  {%- auth0:widget -%}
  ")
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("content-type", "text/html")
  req.Header.Add("authorization", "Bearer MANAGEMENT_API_TOKEN")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)
  fmt.Println(res)
  fmt.Println(string(body))
  }
  ``` lines
  ```java Java
  HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/branding/templates/universal-login")
  .header("content-type", "text/html")
  .header("authorization", "Bearer MANAGEMENT_API_TOKEN")
  .body("

  {%- auth0:head -%}
  {%- auth0:widget -%}
  ")
  .asString();
  ````

  ````javascript Node.JS theme={null}
  var axios = require("axios").default;
  var options = {
  method: 'PUT',
  url: 'https://{yourDomain}/api/v2/branding/templates/universal-login',
  headers: {'content-type': 'text/html', authorization: 'Bearer MANAGEMENT_API_TOKEN'},
  data: '

  {%- auth0:head -%}
  {%- auth0:widget -%}
  '
  };
  axios.request(options).then(function (response) {
  console.log(response.data);
  }).catch(function (error) {
  console.error(error);
  });
  ``` lines
  ```objc Obj-C
  #import 
  NSDictionary \*headers = @{ @"content-type": @"text/html",
  @"authorization": @"Bearer MANAGEMENT_API_TOKEN" };
  NSData \*postData = [[NSData alloc] initWithData:[@"

  {%- auth0:head -%}
  {%- auth0:widget -%}
  " dataUsingEncoding:NSUTF8StringEncoding]];
  NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/branding/templates/universal-login"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
  [request setHTTPMethod:@"PUT"];
  [request setAllHTTPHeaderFields:headers];
  [request setHTTPBody:postData];
  NSURLSession \*session = [NSURLSession sharedSession];
  NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
  if (error) {
  NSLog(@"%@", error);
  } else {
  NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
  NSLog(@"%@", httpResponse);
  }
  }];
  [dataTask resume];
  ````

  ````php PHP theme={null}
  $curl = curl_init();
  curl_setopt_array($curl, [
  CURLOPT_URL => "https://{yourDomain}/api/v2/branding/templates/universal-login",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "

  {%- auth0:head -%}
  {%- auth0:widget -%}
  ",
  CURLOPT_HTTPHEADER => [
  "authorization: Bearer MANAGEMENT_API_TOKEN",
  "content-type: text/html"
  ],
  ]);
  $response = curl_exec($curl);
  $err = curl_error($curl);
  curl_close($curl);
  if ($err) {
  echo "cURL Error #:" . $err;
  } else {
  echo $response;
  }
  ``` lines
  ```python Python
  import http.client
  conn = http.client.HTTPSConnection("")
  payload = "

  {%- auth0:head -%}
  {%- auth0:widget -%}
  "
  headers = {
  'content-type': "text/html",
  'authorization': "Bearer MANAGEMENT_API_TOKEN"
  }
  conn.request("PUT", "/{yourDomain}/api/v2/branding/templates/universal-login", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ````

  ````ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'
  url = URI("https://{yourDomain}/api/v2/branding/templates/universal-login")
  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Put.new(url)
  request["content-type"] = 'text/html'
  request["authorization"] = 'Bearer MANAGEMENT_API_TOKEN'
  request.body = "

  {%- auth0:head -%}
  {%- auth0:widget -%}
  "
  response = http.request(request)
  puts response.read_body
  ``` lines
  ```swift Swift
  import Foundation
  let headers = [
  "content-type": "text/html",
  "authorization": "Bearer MANAGEMENT_API_TOKEN"
  ]
  let postData = NSData(data: "

  {%- auth0:head -%}
  {%- auth0:widget -%}
  ".data(using: String.Encoding.utf8)!)
  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/branding/templates/universal-login")! as URL,
  cachePolicy: .useProtocolCachePolicy,
  timeoutInterval: 10.0)
  request.httpMethod = "PUT"
  request.allHTTPHeaderFields = headers
  request.httpBody = postData as Data
  let session = URLSession.shared
  let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
  print(error)
  } else {
  let httpResponse = response as? HTTPURLResponse
  print(httpResponse)
  }
  })
  dataTask.resume()
  ````
</AuthCodeGroup>

<div id="configure-individual-universal-login-prompts">
  ### Configure individual Universal Login prompts
</div>

Next, add language selection to one or more Universal Login prompts by configuring custom prompt partials. Partials refer to custom code inserted into an entry point within a prompt screen, such as the login screen. To learn more, review [Customize Signup and Login Prompts](/docs/ja-JP/ja-jp/customize/internationalization-and-localization/universal-login-internationalization).

To add language selection to a specific prompt, use the Auth0 <Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=management-api" tip="Management API: 顧客が管理タスクを実行できるようにするための製品。" cta="用語集の表示">Management API</Tooltip> to configure custom prompt partials with the following parameters:

<table class="table">
  <thead>
    <tr>
      <th><strong>Parameter</strong></th>
      <th><strong>Description</strong></th>
      <th><strong>Example Value</strong>                             </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`language`</td>
      <td>Required.<br /><br />One or more languages to include in the language selection menu displayed to users.</td>
      <td>`es`,`fr`,`en`</td>
    </tr>

    <tr>
      <td>`persist`</td>
      <td>Required.<br /><br />Determines whether the language should persist across the session.</td>
      <td>`session`</td>
    </tr>

    <tr>
      <td>`action`</td>
      <td>Optional.<br /><br />Use this parameter in situations where you want users to be able to update their language without advancing the prompt.<br /><br />If the value is provided, the form is <strong>not</strong> automatically submitted when a user changes their language. Otherwise, the prompt automatically advances when a different language is selected.</td>
      <td>`change-language`</td>
    </tr>
  </tbody>
</table>

Access the sections below to review code samples for different types of Universal Login prompts.

<Warning>
  In the code samples below, ensure you replace the placeholders with the appropriate values:

  * Replace `{yourDomain}` with `yourdomain.auth0.com`.
  * Replace `{mgmtApiToken}` with your access token.
</Warning>

<Accordion title="Signup Prompt: Identifier + Password">
  To add language selection to the `signup` prompt, use the [Set partials for a prompt](/docs/ja-JP/ja-jp/api/management/v2/prompts/put-partials) endpoint:

  <AuthCodeGroup>
    ````bash cURL theme={null}
    curl --request PUT \
    --url 'https://{yourDomain}/api/v2/prompts/signup/partials' \
    --header 'authorization: Bearer {mgmtApiToken}' \
    --header 'content-type: application/json' \
    --data '{
    "signup": {
    "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
    }
    }'
    ``` lines
    ```csharp C#
    var client = new RestClient("https://{yourDomain}/api/v2/prompts/signup/partials");
    var request = new RestRequest(Method.PUT);
    request.AddHeader("content-type", "application/json");
    request.AddHeader("authorization", "Bearer {mgmtApiToken}");
    request.AddParameter("application/json", "{
     "signup": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    ````

    ````go Go theme={null}
    package main
    import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
    )
    func main() {
    url := "https://{yourDomain}/api/v2/prompts/signup/partials"
    payload := strings.NewReader("{
     "signup": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }")
    req, _ := http.NewRequest("PUT", url, payload)
    req.Header.Add("content-type", "application/json")
    req.Header.Add("authorization", "Bearer {mgmtApiToken}")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(res)
    fmt.Println(string(body))
    }
    ``` lines
    ```java Java
    HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/prompts/signup/partials")
    .header("content-type", "application/json")
    .header("authorization", "Bearer {mgmtApiToken}")
    .body("{
     "signup": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }")
    .asString();
    ````

    ````javascript Node.JS theme={null}
    var axios = require("axios").default;
    var options = {
    method: 'PUT',
    url: 'https://{yourDomain}/api/v2/prompts/signup/partials',
    headers: {'content-type': 'application/json', authorization: 'Bearer {mgmtApiToken}'},
    data: {
    signup: {
    'form-content-start': '

    Preferred LanguageEnglishFrenchSpanish

    '
    }
    }
    };
    axios.request(options).then(function (response) {
    console.log(response.data);
    }).catch(function (error) {
    console.error(error);
    });
    ``` lines
    ```objc Obj-C
    #import 
    NSDictionary \*headers = @{ @"content-type": @"application/json",
    @"authorization": @"Bearer {mgmtApiToken}" };
    NSDictionary \*parameters = @{ @"signup": @{ @"form-content-start": @"

    Preferred LanguageEnglishFrenchSpanish

    " } };
    NSData \*postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
    NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/prompts/signup/partials"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
    [request setHTTPMethod:@"PUT"];
    [request setAllHTTPHeaderFields:headers];
    [request setHTTPBody:postData];
    NSURLSession \*session = [NSURLSession sharedSession];
    NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
    completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
    if (error) {
    NSLog(@"%@", error);
    } else {
    NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
    NSLog(@"%@", httpResponse);
    }
    }];
    [dataTask resume];
    ````

    ````php PHP theme={null}
    $curl = curl_init();
    curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/prompts/signup/partials",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_POSTFIELDS => "{
     "signup": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }",
    CURLOPT_HTTPHEADER => [
    "authorization: Bearer {mgmtApiToken}",
    "content-type: application/json"
    ],
    ]);
    $response = curl_exec($curl);
    $err = curl_error($curl);
    curl_close($curl);
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
    ``` lines
    ```python Python
    import http.client
    conn = http.client.HTTPSConnection("")
    payload = "{
     "signup": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }"
    headers = {
    'content-type': "application/json",
    'authorization': "Bearer {mgmtApiToken}"
    }
    conn.request("PUT", "/{yourDomain}/api/v2/prompts/signup/partials", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    ````

    ````ruby Ruby theme={null}
    require 'uri'
    require 'net/http'
    require 'openssl'
    url = URI("https://{yourDomain}/api/v2/prompts/signup/partials")
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    request = Net::HTTP::Put.new(url)
    request["content-type"] = 'application/json'
    request["authorization"] = 'Bearer {mgmtApiToken}'
    request.body = "{
     "signup": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }"
    response = http.request(request)
    puts response.read_body
    ``` lines
    ```swift Swift
    import Foundation
    let headers = [
    "content-type": "application/json",
    "authorization": "Bearer {mgmtApiToken}"
    ]
    let parameters = ["signup": ["form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "]] as [String : Any]
    let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
    let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/prompts/signup/partials")! as URL,
    cachePolicy: .useProtocolCachePolicy,
    timeoutInterval: 10.0)
    request.httpMethod = "PUT"
    request.allHTTPHeaderFields = headers
    request.httpBody = postData as Data
    let session = URLSession.shared
    let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
    if (error != nil) {
    print(error)
    } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
    }
    })
    dataTask.resume()
    ````
  </AuthCodeGroup>
</Accordion>

<Accordion title="Login Prompt: Identifier First">
  To add language selection to the `login-id` prompt, use the [Set partials for a prompt](/docs/ja-JP/ja-jp/api/management/v2/prompts/put-partials) endpoint:

  <AuthCodeGroup>
    ````bash cURL theme={null}
    curl --request PUT \
    --url 'https://{yourDomain}/api/v2/prompts/login-id/partials' \
    --header 'authorization: Bearer {mgmtApiToken}' \
    --header 'content-type: application/json' \
    --data '{
    "login-id": {
    "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
    }
    }'
    ``` lines
    ```csharp C#
    var client = new RestClient("https://{yourDomain}/api/v2/prompts/login-id/partials");
    var request = new RestRequest(Method.PUT);
    request.AddHeader("content-type", "application/json");
    request.AddHeader("authorization", "Bearer {mgmtApiToken}");
    request.AddParameter("application/json", "{
     "login-id": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    ````

    ````go Go theme={null}
    package main
    import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
    )
    func main() {
    url := "https://{yourDomain}/api/v2/prompts/login-id/partials"
    payload := strings.NewReader("{
     "login-id": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }")
    req, _ := http.NewRequest("PUT", url, payload)
    req.Header.Add("content-type", "application/json")
    req.Header.Add("authorization", "Bearer {mgmtApiToken}")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(res)
    fmt.Println(string(body))
    }
    ``` lines
    ```java Java
    HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/prompts/login-id/partials")
    .header("content-type", "application/json")
    .header("authorization", "Bearer {mgmtApiToken}")
    .body("{
     "login-id": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }")
    .asString();
    ````

    ````javascript Node.JS theme={null}
    var axios = require("axios").default;
    var options = {
    method: 'PUT',
    url: 'https://{yourDomain}/api/v2/prompts/login-id/partials',
    headers: {'content-type': 'application/json', authorization: 'Bearer {mgmtApiToken}'},
    data: {
    'login-id': {
    'form-content-start': '

    Preferred LanguageEnglishFrenchSpanish

    '
    }
    }
    };
    axios.request(options).then(function (response) {
    console.log(response.data);
    }).catch(function (error) {
    console.error(error);
    });
    ``` lines
    ```objc Obj-C
    #import 
    NSDictionary \*headers = @{ @"content-type": @"application/json",
    @"authorization": @"Bearer {mgmtApiToken}" };
    NSDictionary \*parameters = @{ @"login-id": @{ @"form-content-start": @"

    Preferred LanguageEnglishFrenchSpanish

    " } };
    NSData \*postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
    NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/prompts/login-id/partials"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
    [request setHTTPMethod:@"PUT"];
    [request setAllHTTPHeaderFields:headers];
    [request setHTTPBody:postData];
    NSURLSession \*session = [NSURLSession sharedSession];
    NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
    completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
    if (error) {
    NSLog(@"%@", error);
    } else {
    NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
    NSLog(@"%@", httpResponse);
    }
    }];
    [dataTask resume];
    ````

    ````php PHP theme={null}
    $curl = curl_init();
    curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/prompts/login-id/partials",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_POSTFIELDS => "{
     "login-id": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }",
    CURLOPT_HTTPHEADER => [
    "authorization: Bearer {mgmtApiToken}",
    "content-type: application/json"
    ],
    ]);
    $response = curl_exec($curl);
    $err = curl_error($curl);
    curl_close($curl);
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
    ``` lines
    ```python Python
    import http.client
    conn = http.client.HTTPSConnection("")
    payload = "{
     "login-id": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }"
    headers = {
    'content-type': "application/json",
    'authorization': "Bearer {mgmtApiToken}"
    }
    conn.request("PUT", "/{yourDomain}/api/v2/prompts/login-id/partials", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    ````

    ````ruby Ruby theme={null}
    require 'uri'
    require 'net/http'
    require 'openssl'
    url = URI("https://{yourDomain}/api/v2/prompts/login-id/partials")
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    request = Net::HTTP::Put.new(url)
    request["content-type"] = 'application/json'
    request["authorization"] = 'Bearer {mgmtApiToken}'
    request.body = "{
     "login-id": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }"
    response = http.request(request)
    puts response.read_body
    ``` lines
    ```swift Swift
    import Foundation
    let headers = [
    "content-type": "application/json",
    "authorization": "Bearer {mgmtApiToken}"
    ]
    let parameters = ["login-id": ["form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "]] as [String : Any]
    let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
    let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/prompts/login-id/partials")! as URL,
    cachePolicy: .useProtocolCachePolicy,
    timeoutInterval: 10.0)
    request.httpMethod = "PUT"
    request.allHTTPHeaderFields = headers
    request.httpBody = postData as Data
    let session = URLSession.shared
    let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
    if (error != nil) {
    print(error)
    } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
    }
    })
    dataTask.resume()
    ````
  </AuthCodeGroup>
</Accordion>

<Accordion title="Login Prompt: Passwordless (Email)">
  To add language selection to the `login-passwordless-email-code` prompt, use the [Set partials for a prompt](/docs/ja-JP/ja-jp/api/management/v2/prompts/put-partials) endpoint:

  <AuthCodeGroup>
    ````bash cURL theme={null}
    curl --request PUT \
    --url 'https://{yourDomain}/api/v2/prompts/login-passwordless/partials' \
    --header 'authorization: Bearer {mgmtApiToken}' \
    --header 'content-type: application/json' \
    --data '{
    "login-passwordless-email-code": {
    "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
    }
    }'
    ``` lines
    ```csharp C#
    var client = new RestClient("https://{yourDomain}/api/v2/prompts/login-passwordless/partials");
    var request = new RestRequest(Method.PUT);
    request.AddHeader("content-type", "application/json");
    request.AddHeader("authorization", "Bearer {mgmtApiToken}");
    request.AddParameter("application/json", "{
     "login-passwordless-email-code": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    ````

    ````go Go theme={null}
    package main
    import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
    )
    func main() {
    url := "https://{yourDomain}/api/v2/prompts/login-passwordless/partials"
    payload := strings.NewReader("{
     "login-passwordless-email-code": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }")
    req, _ := http.NewRequest("PUT", url, payload)
    req.Header.Add("content-type", "application/json")
    req.Header.Add("authorization", "Bearer {mgmtApiToken}")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(res)
    fmt.Println(string(body))
    }
    ``` lines
    ```java Java
    HttpResponse response = Unirest.put("https://{yourDomain}/api/v2/prompts/login-passwordless/partials")
    .header("content-type", "application/json")
    .header("authorization", "Bearer {mgmtApiToken}")
    .body("{
     "login-passwordless-email-code": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }")
    .asString();
    ````

    ````javascript Node.JS theme={null}
    var axios = require("axios").default;
    var options = {
    method: 'PUT',
    url: 'https://{yourDomain}/api/v2/prompts/login-passwordless/partials',
    headers: {'content-type': 'application/json', authorization: 'Bearer {mgmtApiToken}'},
    data: {
    'login-passwordless-email-code': {
    'form-content-start': '

    Preferred LanguageEnglishFrenchSpanish

    '
    }
    }
    };
    axios.request(options).then(function (response) {
    console.log(response.data);
    }).catch(function (error) {
    console.error(error);
    });
    ``` lines
    ```objc Obj-C
    #import 
    NSDictionary \*headers = @{ @"content-type": @"application/json",
    @"authorization": @"Bearer {mgmtApiToken}" };
    NSDictionary \*parameters = @{ @"login-passwordless-email-code": @{ @"form-content-start": @"

    Preferred LanguageEnglishFrenchSpanish

    " } };
    NSData \*postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
    NSMutableURLRequest \*request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/prompts/login-passwordless/partials"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
    [request setHTTPMethod:@"PUT"];
    [request setAllHTTPHeaderFields:headers];
    [request setHTTPBody:postData];
    NSURLSession \*session = [NSURLSession sharedSession];
    NSURLSessionDataTask \*dataTask = [session dataTaskWithRequest:request
    completionHandler:^(NSData \*data, NSURLResponse \*response, NSError \*error) {
    if (error) {
    NSLog(@"%@", error);
    } else {
    NSHTTPURLResponse \*httpResponse = (NSHTTPURLResponse \*) response;
    NSLog(@"%@", httpResponse);
    }
    }];
    [dataTask resume];
    ````

    ````php PHP theme={null}
    $curl = curl_init();
    curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/prompts/login-passwordless/partials",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_POSTFIELDS => "{
     "login-passwordless-email-code": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }",
    CURLOPT_HTTPHEADER => [
    "authorization: Bearer {mgmtApiToken}",
    "content-type: application/json"
    ],
    ]);
    $response = curl_exec($curl);
    $err = curl_error($curl);
    curl_close($curl);
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
    ``` lines
    ```python Python
    import http.client
    conn = http.client.HTTPSConnection("")
    payload = "{
     "login-passwordless-email-code": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }"
    headers = {
    'content-type': "application/json",
    'authorization': "Bearer {mgmtApiToken}"
    }
    conn.request("PUT", "/{yourDomain}/api/v2/prompts/login-passwordless/partials", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    ````

    ````ruby Ruby theme={null}
    require 'uri'
    require 'net/http'
    require 'openssl'
    url = URI("https://{yourDomain}/api/v2/prompts/login-passwordless/partials")
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    request = Net::HTTP::Put.new(url)
    request["content-type"] = 'application/json'
    request["authorization"] = 'Bearer {mgmtApiToken}'
    request.body = "{
     "login-passwordless-email-code": {
     "form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "
     }
    }"
    response = http.request(request)
    puts response.read_body
    ``` lines
    ```swift Swift
    import Foundation
    let headers = [
    "content-type": "application/json",
    "authorization": "Bearer {mgmtApiToken}"
    ]
    let parameters = ["login-passwordless-email-code": ["form-content-start": "

    Preferred LanguageEnglishFrenchSpanish

    "]] as [String : Any]
    let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
    let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/prompts/login-passwordless/partials")! as URL,
    cachePolicy: .useProtocolCachePolicy,
    timeoutInterval: 10.0)
    request.httpMethod = "PUT"
    request.allHTTPHeaderFields = headers
    request.httpBody = postData as Data
    let session = URLSession.shared
    let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
    if (error != nil) {
    print(error)
    } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
    }
    })
    dataTask.resume()
    ````
  </AuthCodeGroup>
</Accordion>
