현지화된 텍스트 지정
Actions Center Retail Ordering Business Link 통합에서 현지화를 지원하는 것이 좋습니다. 사용자의 언어 설정에 따라 현지화된 환경이 표시됩니다. 현지화가 설정되지 않은 경우 사용자에게 기본 텍스트가 표시될 수 있습니다. 서비스 이름, 설명 등 통합의 여러 입력란에 현지화된 텍스트를 제공할 수 있습니다. Text
메시지를 사용하여 현지화할 수 있는 필드의 전체 목록은 피드 사양을 참고하세요.
현지화 구현
// A possibly-localized text payload. Some Text fields may contain marked-up
// content.
message Text {
// Required. Text value in an unknown locale, which will be displayed if
// `localized_value` for the user locale is empty or missing. The locale for
// this value may depend on the partner or service provider, and it should not
// be assumed to be any specific language.
string value = 1;
// Per-locale text values. Required.
repeated LocalizedString localized_value = 2;
}
Text
메시지를 사용하는 피드의 모든 필드는 지원되는 각 언어에 localized_value
를 제공하여 현지화할 수 있습니다.
value
및 localized_value
를 모두 지정해야 합니다.
- 사용자의 언어 브라우저 설정에 설정된 사용자 언어를 기반으로
localized_value
가 표시됩니다.
- 사용자의 언어가 지원되는 현지화 목록에 없으면 이 값이 기본값으로 사용됩니다.
- 값을 정의하지 않았고 사용자 언어가 지원되는 언어 목록에 없는 경우 localized_value에 있는 첫 번째 값이 사용됩니다. 이 대체 방법을 사용할 수 있지만 기본값을 명시적으로 지정하는 것이 좋습니다.
시스템에서 현지화를 지원하지 않는 경우 localized_value
를 설정하고 지원하는 유일한 언어로 locale
를 설정하세요. 기본값으로 사용될 수 있는 value
도 설정합니다.
서비스 피드 스니펫의 예
"localized_service_name": {
"value": "Chocolate Tasting",
"localized_value": [
{
"locale": "en",
"value": "Chocolate Tasting"
},
{
"locale": "fr",
"value": "Dégustation de chocolats"
}
]
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-26(UTC)
[null,null,["최종 업데이트: 2024-11-26(UTC)"],[[["Localization is highly recommended for the Actions Center Retail Ordering Business Link integration to provide users with a personalized experience in their preferred language."],["You can localize many fields like service names and descriptions using the `Text` message format specified in the feed specification."],["Both `value` (default text) and `localized_value` (language-specific text) are required for localization to function correctly, ensuring content is displayed even if a user's locale isn't explicitly supported."],["If localization isn't supported by your system, provide a single `localized_value` with your supported language and locale, along with a default `value`."]]],["Localization is strongly recommended for the Actions Center Retail Ordering Business Link integration. You can localize fields like service names and descriptions by using the `Text` message within the feed. Each localized field requires a default `value` and `localized_value` entries for each supported language. The `localized_value` is displayed based on the user's language settings, and the `value` is used as a default. If localization is not supported, set the `localized_value` with your single supported language and set the default `value`.\n"]]