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

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

# Configure Flexible Language Selection

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 tip="Universal Login: Your application redirects to Universal Login, hosted on Auth0's Authorization Server, to verify a user's identity." cta="View Glossary" href="/docs/fr-CA/glossary?term=Universal+Login">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 selectio]\(/docs/images/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/gC1sp2cPcB7j7ynR/docs/images/cdy7uua7fh8z/4Z5pt3aH3vpRRYV0RDDnba/dc7a5abc8ee2cb462b2be4b43490393c/Language_Selector_Prompts.png?fit=max&auto=format&n=gC1sp2cPcB7j7ynR&q=85&s=fa29e9119ef31c34c576c5a3f532b1f6" alt="Two Universal Login prompts showing the language selection menu. " width="982" height="636" data-path="docs/images/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/fr-CA/fr-ca/authenticate/login/auth0-universal-login).

  * This feature is not available for custom login pages.
* Configure a [custom domain](/docs/fr-CA/fr-ca/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/fr-CA/fr-ca/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/fr-CA/fr-ca/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 '<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='''_widget-auto-layout'''>{%- auth0:widget -%}</body>
  <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>'
  ```

  ```csharp C# theme={null}
  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("<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>")

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

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.put("https://{yourDomain}/api/v2/branding/templates/universal-login")
    .header("content-type", "text/html")
    .header("authorization", "Bearer MANAGEMENT_API_TOKEN")
    .body("<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>")
    .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: '<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>'
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```objc Obj-C theme={null}
  #import <Foundation/Foundation.h>

  NSDictionary *headers = @{ @"content-type": @"text/html",
                             @"authorization": @"Bearer MANAGEMENT_API_TOKEN" };

  NSData *postData = [[NSData alloc] initWithData:[@"<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>" 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 => "<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>",
    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;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  payload = "<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>"

  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 = "<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>"

  response = http.request(request)
  puts response.read_body
  ```

  ```swift Swift theme={null}
  import Foundation

  let headers = [
    "content-type": "text/html",
    "authorization": "Bearer MANAGEMENT_API_TOKEN"
  ]

  let postData = NSData(data: "<!DOCTYPE html>
  <html>
  <head>{%- auth0:head -%}</head>
  <body class='_widget-auto-layout'>{%- auth0:widget -%}</body>
  <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>".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/fr-CA/customize/internationalization-and-localization/universal-login-internationalization).

To add language selection to a specific prompt, use the Auth0 <Tooltip tip="Management API: A product to allow customers to perform administrative tasks." cta="View Glossary" href="/docs/fr-CA/glossary?term=Management+API">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>

<AccordionGroup>
  <Accordion title="Signup Prompt: Identifier + Password">
    To add language selection to the `signup` prompt, use the [Set partials for a prompt](https://auth0.com/docs/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": "<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>"
          }
      }'
      ```

      ```csharp C# theme={null}
      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }", 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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }")

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

      }
      ```

      ```java Java theme={null}
      HttpResponse<String> response = Unirest.put("https://{yourDomain}/api/v2/prompts/signup/partials")
        .header("content-type", "application/json")
        .header("authorization", "Bearer {mgmtApiToken}")
        .body("{
          "signup": {
              "form-content-start": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }")
        .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': '<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>'
          }
        }
      };

      axios.request(options).then(function (response) {
        console.log(response.data);
      }).catch(function (error) {
        console.error(error);
      });
      ```

      ```objc Obj-C theme={null}
      #import <Foundation/Foundation.h>

      NSDictionary *headers = @{ @"content-type": @"application/json",
                                 @"authorization": @"Bearer {mgmtApiToken}" };
      NSDictionary *parameters = @{ @"signup": @{ @"form-content-start": @"<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>" } };

      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }",
        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;
      }
      ```

      ```python Python theme={null}
      import http.client

      conn = http.client.HTTPSConnection("")

      payload = "{
          "signup": {
              "form-content-start": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }"

      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }"

      response = http.request(request)
      puts response.read_body
      ```

      ```swift Swift theme={null}
      import Foundation

      let headers = [
        "content-type": "application/json",
        "authorization": "Bearer {mgmtApiToken}"
      ]
      let parameters = ["signup": ["form-content-start": "<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>"]] 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/fr-CA/fr-ca/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": "<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>"
          }
      }'
      ```

      ```csharp C# theme={null}
      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }", 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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }")

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

      }
      ```

      ```java Java theme={null}
      HttpResponse<String> 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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }")
        .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': '<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>'
          }
        }
      };

      axios.request(options).then(function (response) {
        console.log(response.data);
      }).catch(function (error) {
        console.error(error);
      });
      ```

      ```objc Obj-C theme={null}
      #import <Foundation/Foundation.h>

      NSDictionary *headers = @{ @"content-type": @"application/json",
                                 @"authorization": @"Bearer {mgmtApiToken}" };
      NSDictionary *parameters = @{ @"login-id": @{ @"form-content-start": @"<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>" } };

      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }",
        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;
      }
      ```

      ```python Python theme={null}
      import http.client

      conn = http.client.HTTPSConnection("")

      payload = "{
          "login-id": {
              "form-content-start": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }"

      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
          }
      }"

      response = http.request(request)
      puts response.read_body
      ```

      ```swift Swift theme={null}
      import Foundation

      let headers = [
        "content-type": "application/json",
        "authorization": "Bearer {mgmtApiToken}"
      ]
      let parameters = ["login-id": ["form-content-start": "<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>"]] 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/fr-CA/fr-ca/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": "<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>"
        }
      }'
      ```

      ```csharp C# theme={null}
      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
        }
      }", 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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
        }
      }")

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

      }
      ```

      ```java Java theme={null}
      HttpResponse<String> 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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
        }
      }")
        .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': '<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>'
          }
        }
      };

      axios.request(options).then(function (response) {
        console.log(response.data);
      }).catch(function (error) {
        console.error(error);
      });
      ```

      ```objc Obj-C theme={null}
      #import <Foundation/Foundation.h>

      NSDictionary *headers = @{ @"content-type": @"application/json",
                                 @"authorization": @"Bearer {mgmtApiToken}" };
      NSDictionary *parameters = @{ @"login-passwordless-email-code": @{ @"form-content-start": @"<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>" } };

      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
        }
      }",
        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;
      }
      ```

      ```python Python theme={null}
      import http.client

      conn = http.client.HTTPSConnection("")

      payload = "{
          "login-passwordless-email-code": {
            "form-content-start": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
        }
      }"

      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": "<div class=\\"ulp-field\\"><label for=\\"language\\">Preferred Language</label><select name=\\"language\\"id=\\"language\\"  onchange=updateSelectedLanguage()><option></option><option value=\\"en\\" {% if locale == \\"en\\" %}selected{% endif %}>English</option><option value=\\"fr\\" {% if locale == \\"fr\\" %}selected{% endif %}>French</option><option value=\\"es\\" {% if locale == \\"es\\" %}selected{% endif %}>Spanish</option></select></div><input type=\\"hidden\\" name=\\"persist\\" value=\\"session\\"/><input name=\\"action\\" id=\\"changeLanguage\\" type=\\"submit\\" value=\\"change-language\\" style=\\"display:none\\" formnovalidate/>"
        }
      }"

      response = http.request(request)
      puts response.read_body
      ```

      ```swift Swift theme={null}
      import Foundation

      let headers = [
        "content-type": "application/json",
        "authorization": "Bearer {mgmtApiToken}"
      ]
      let parameters = ["login-passwordless-email-code": ["form-content-start": "<div class="ulp-field"><label for="language">Preferred Language</label><select name="language"id="language"  onchange=updateSelectedLanguage()><option></option><option value="en" {% if locale == "en" %}selected{% endif %}>English</option><option value="fr" {% if locale == "fr" %}selected{% endif %}>French</option><option value="es" {% if locale == "es" %}selected{% endif %}>Spanish</option></select></div><input type="hidden" name="persist" value="session"/><input name="action" id="changeLanguage" type="submit" value="change-language" style="display:none" formnovalidate/>"]] 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>
</AccordionGroup>
