ユニバーサルログインの国際化
ユニバーサルログインのローカライズ
ユニバーサルログインエクスペリエンスは、以下の言語にローカライズされています。
言語 | コード |
---|---|
アルバニア語 | sq |
アムハラ語 | am |
アルメニア語 | hy |
アゼルバイジャン語 | az |
バスク語 | eu-ES |
ベンガル語 | bn |
ボスニア語 | bs |
ブルガリア語 | bg |
カタルニア語 | ca-ES |
中国語 - 香港特別行政区 | zh-HK |
中国語 - 簡体 | zh-CN |
中国語 - 繁体 | zh-TW |
クロアチア語 | hr |
チェコ語 | cs |
デンマーク語 | da |
オランダ語 | nl |
英語 | en |
英語 - カナダ | en-CA |
エストニア語 | et |
フィンランド語 | fi |
フランス語 | fr-FR |
フランス語 - カナダ | fr-CA |
ガリシア語 | gl-ES |
ジョージア語 | ka |
ドイツ語 | de |
ギリシャ語 | el |
グジャラート語 | gu |
ヒンディー語 | hi |
ハンガリー語 | hu |
アイスランド語 | is |
インドネシア語 | id |
イタリア語 | it |
日本語 | ja |
カンナダ語 | kn |
韓国語 | ko |
ラトビア語 | lv |
リトアニア語 | lt |
マケドニア語 | mk |
マレー語 | ms |
マラヤーラム語 | ml |
マラーティー語 | mr |
モンゴル語 | mn |
モンテネグロ語 | cnr |
ミャンマー語 | my |
ノルウェー語 | no |
ノルウェー語 - ブークモール | nb |
ノルウェー語 - ニーノシュク | nn |
ポーランド語 | pl |
ポルトガル語 - ブラジル | pt-BR |
ポルトガル語 - ポルトガル | pt-PT |
パンジャブ語 | pa |
ルーマニア語 | ro |
ロシア語 | ru |
セルビア語 | sr |
スロバキア語 | sk |
スロベニア語 | sl |
ソマリ語 | so |
スペイン語 | es |
スペイン語 - アルゼンチン | es-AR |
スペイン語 - ラテン アメリカ | es-419 |
スペイン語 - メキシコ | es-MX |
スワヒリ語 | sw |
スウェーデン語 | sv |
タガログ語 | tl |
タマジット語 | zgh |
タミール語 | ta |
テルグ語 | te |
タイ語 | th |
トルコ語 | tr |
ウクライナ語 | uk |
ベトナム語 | vi |
ウェールズ語 | cy |
言語の選択
ページの言語は、以下の条件に基づいて選択されます。
Auth0がサポートする言語(上記に記載)。
テナント設定で構成された言語のリスト。ここでテナントがサポートする言語を選択し、デフォルト言語を設定できます。このリストでは、デフォルトで英語のみが選択されていますが、必要な言語を選択できます。
アプリケーションまたはセッションの言語リストを制限するための、Authorization Requestエンドポイントに送信される
ui_locales
パラメーターの値。スペース区切りのロケールのリストを指定できます。UIに反映されるためには、リストの最初のロケールがテナントで有効化されているロケールと一致している必要があります。ブラウザーによって送信される
Accept-Language
HTTPヘッダー。ページは、上記の設定で許可されている限り、この言語で表示されます。そうでない場合、ページはデフォルトの言語で表示されます。
上記に記載されていない言語を追加するには、管理APIを使用して、次の本文でテナントエンドポイントにPATCH
呼び出しを行い、he
を追加する言語コードに置き換えます。
{
"enabled_locales": [
"en","he"
]
}
Was this helpful?
追加したら、ログイン要求のui_localesクエリパラメーターで言語を指定します。
テナントでサポートされている言語を設定する
サポートされている言語とデフォルト言語は、Dashboardの[Tenant Settings(テナント設定)]セクションで設定できます。
Management APIを使用して、Update Tenant Settingsエンドポイントからテナントの有効な言語を指定することもできます。リストの最初の言語がデフォルトの言語になります。
curl --request PATCH \
--url 'https://{yourDomain}/api/v2/tenants/settings' \
--header 'authorization: Bearer API2_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{ "enabled_locales" : [ "en", "es"]}'
Was this helpful?
var client = new RestClient("https://{yourDomain}/api/v2/tenants/settings");
var request = new RestRequest(Method.PATCH);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer API2_ACCESS_TOKEN");
request.AddParameter("application/json", "{ \"enabled_locales\" : [ \"en\", \"es\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Was this helpful?
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://{yourDomain}/api/v2/tenants/settings"
payload := strings.NewReader("{ \"enabled_locales\" : [ \"en\", \"es\"]}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
req.Header.Add("authorization", "Bearer API2_ACCESS_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Was this helpful?
HttpResponse<String> response = Unirest.patch("https://{yourDomain}/api/v2/tenants/settings")
.header("content-type", "application/json")
.header("authorization", "Bearer API2_ACCESS_TOKEN")
.body("{ \"enabled_locales\" : [ \"en\", \"es\"]}")
.asString();
Was this helpful?
var axios = require("axios").default;
var options = {
method: 'PATCH',
url: 'https://{yourDomain}/api/v2/tenants/settings',
headers: {'content-type': 'application/json', authorization: 'Bearer API2_ACCESS_TOKEN'},
data: {enabled_locales: ['en', 'es']}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
Was this helpful?
#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"content-type": @"application/json",
@"authorization": @"Bearer API2_ACCESS_TOKEN" };
NSDictionary *parameters = @{ @"enabled_locales": @[ @"en", @"es" ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/tenants/settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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];
Was this helpful?
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{yourDomain}/api/v2/tenants/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "{ \"enabled_locales\" : [ \"en\", \"es\"]}",
CURLOPT_HTTPHEADER => [
"authorization: Bearer API2_ACCESS_TOKEN",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Was this helpful?
import http.client
conn = http.client.HTTPSConnection("")
payload = "{ \"enabled_locales\" : [ \"en\", \"es\"]}"
headers = {
'content-type': "application/json",
'authorization': "Bearer API2_ACCESS_TOKEN"
}
conn.request("PATCH", "/{yourDomain}/api/v2/tenants/settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Was this helpful?
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://{yourDomain}/api/v2/tenants/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer API2_ACCESS_TOKEN'
request.body = "{ \"enabled_locales\" : [ \"en\", \"es\"]}"
response = http.request(request)
puts response.read_body
Was this helpful?
import Foundation
let headers = [
"content-type": "application/json",
"authorization": "Bearer API2_ACCESS_TOKEN"
]
let parameters = ["enabled_locales": ["en", "es"]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/tenants/settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
Was this helpful?
制限事項
ui_locales
パラメーターは、SAMLや WS-Federationでは利用できないため、OAuthフローでしか使用できません。ui_locales
パラメーターは、上流のアイデンティティプロバイダーには転送されません。アイデンティティプロバイダーにパラメーターを渡す方法については、「パラメータをアイデンティティプロバイダーに渡す」をお読みください。同意ページ内のスコープをローカライズすることはできません。
既知の問題
ULPは、言語コード
fr-FR
に対してHTMLのlang
属性をfr
としてレンダリングします。ULPは、言語コード
pt-PT
に対してHTMLのlang
属性をpt
としてレンダリングします。
クラシックログインのローカライズ
クラシックログインエクスペリエンスでは、ログイン用のJavaScriptウィジェット、パスワードリセットページ、パスワードポリシーを使用してローカライズが行われます。
MFAページはデフォルトで、ローカライズできないAuth0 MFAウィジェットを使用しています。guardian.jsを使用することで、ローカライズされたバージョンを作成できます。
同意ページをローカライズすることはできません。