言語コードを読む
get
/content/management/api/v1.1/l10n/languageCodes/{code}
コード別に言語を読み取ります。
リクエスト
パス・パラメータ
- code: string
言語のコード。 大/小文字が区別されます
問合せパラメータ
- lang(optional): string
すべてのロケール情報を想定できる言語値デフォルト値:
en-US - links(optional): string
このパラメータは、リンク名のカンマ区切りのリストを受け入れます。 デフォルトでは、このパラメータによって、適用可能なすべてのリンクが指定されます。 可能な値は次のとおりです: self, canonical, describedby
レスポンス
サポートされているメディア・タイプ
- application/json
200レスポンス
OK。
ルート・スキーマ : LanguageBean
型:
ソースを表示
object- code(optional): string
ロケール・コード
- createdBy(optional): string
作成方法
- createdDate(optional): object date
date
- description(optional): string
ロケールの説明
- language(optional): string
ロケール言語
- languageType(optional): string
これがカスタム・ロケールかデフォルト・ロケールかを示します
- links(optional): array links
- script(optional): string
言語コードからのスクリプト
- territory(optional): string
言語コード・テリトリ
- updatedBy(optional): string
更新者。
- updatedDate(optional): object date
date
ネストされたスキーマ: Link
型:
objectリソースのリンク。
ソースを表示
- href(optional): string
ターゲット・リソースのURI それはテンプレートURIである可能性があります。 これはレスポンス取得の必須プロパティです。
- mediaType(optional): string
メディア・タイプ。
- method(optional): string
ターゲット・リソースへのアクセスに使用できるHTTPメソッド。
- profile(optional): string
ターゲット・リソースを記述するメタデータにリンクします。
- rel(optional): string
関連タイプ これはレスポンス取得の必須プロパティです。
- templated(optional): boolean
URIがテンプレートであるかどうか。
304 レスポンス
変更されていません。
400レスポンス
不正リクエスト
404レスポンス
見つかりません。
500レスポンス
内部サーバー・エラー
例
次の例では、cURLを使用してRESTリソースに対するGETリクエストを発行することによって、コードごとに言語を読み取る方法を示しています:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/l10n/languageCodes/{code}'
例1:
これは、code:en-x-my-custom-subtagを持つ言語コードを読み取ります。/content/management/api/v1.1/l10n/languageCodes/en-x-my-custom-subtag
レスポンス本文
{
"code": "en-x-my-custom-subtag",
"language": "English",
"description": "en-x-my-custom-subtag description",
"territory": null,
"script": null,
"languageType": "custom",
"createdBy": "swebcli.SitesAdmin1.admin",
"createdDate": {
"value": "2020-04-30T18:37:20.671Z",
"timezone": "UTC"
},
"updatedBy": "swebcli.SitesAdmin1.admin",
"updatedDate": {
"value": "2020-04-30T18:37:20.671Z",
"timezone": "UTC"
},
"links": [
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes",
"rel": "self",
"method": "POST",
"mediaType": "application/json"
},
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes",
"rel": "canonical",
"method": "POST",
"mediaType": "application/json"
},
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/metadata-catalog/l10n/languageCodes",
"rel": "describedby",
"method": "GET",
"mediaType": "application/schema+json"
}
例2:
これは、code:arの言語コードを読み取り、en-USの言語を返します。
/content/management/api/v1.1/l10n/languageCodes/az-Cyrl-AZ
{
"code": "az-Cyrl-AZ",
"language": "Azerbaijani",
"description": "",
"territory": "Azerbaijan",
"script": "Cyrillic",
"languageType": "default",
"createdBy": "system",
"createdDate": {
"value": "1970-01-18T04:00:28.800Z",
"timezone": "UTC"
},
"updatedBy": "system",
"updatedDate": {
"value": "1970-01-18T04:00:28.800Z",
"timezone": "UTC"
},
"links": [
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/az-Cyrl-AZ",
"rel": "self",
"method": "GET",
"mediaType": "application/json"
},
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/az-Cyrl-AZ",
"rel": "canonical",
"method": "GET",
"mediaType": "application/json"
},
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/metadata-catalog/l10n/languageCodes/az-Cyrl-AZ",
"rel": "describedby",
"method": "GET",
"mediaType": "application/schema+json"
}
例3 :
これは、code:arの言語コードを読み取り、アラビア語の言語を返します。
/content/management/api/v1.1/l10n/languageCodes/ar?lang=ar
{
"code": "ar",
"language": "??????????????",
"description": "",
"territory": null,
"script": null,
"languageType": "default",
"createdBy": "system",
"createdDate": {
"value": "1970-01-18T04:00:28.800Z",
"timezone": "UTC"
},
"updatedBy": "system",
"updatedDate": {
"value": "1970-01-18T04:00:28.800Z",
"timezone": "UTC"
},
"links": [
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/ar?lang=ar",
"rel": "self",
"method": "GET",
"mediaType": "application/json"
},
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes/ar?lang=ar",
"rel": "canonical",
"method": "GET",
"mediaType": "application/json"
},
{
"href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/metadata-catalog/l10n/languageCodes/ar",
"rel": "describedby",
"method": "GET",
"mediaType": "application/schema+json"
}
]
}