स्थानीय भाषा में टेक्स्ट डालना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
हमारा सुझाव है कि आप ऐक्शन सेंटर के 'सीधे बुकिंग करने की सुविधा' के इंटिग्रेशन में, स्थानीय भाषा के हिसाब से कॉन्टेंट दिखाने की सुविधा का इस्तेमाल करें. उपयोगकर्ताओं को उनकी भाषा सेटिंग के आधार पर, स्थानीय अनुभव दिखाया जाता है. अगर स्थानीय भाषा सेट नहीं की गई है, तो उपयोगकर्ता को डिफ़ॉल्ट टेक्स्ट दिखाया जा सकता है. इंटिग्रेशन में कई फ़ील्ड के लिए, स्थानीय भाषा में टेक्स्ट दिया जा सकता है. जैसे, सेवा के नाम और जानकारी. 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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eLocalization in Actions Center Reservations is highly recommended to provide users with a tailored experience based on their language settings.\u003c/p\u003e\n"],["\u003cp\u003eLocalizable fields, such as service names and descriptions, can be found in the feed specification, and are identified by utilizing the \u003ccode\u003eText\u003c/code\u003e message type.\u003c/p\u003e\n"],["\u003cp\u003eImplementing localization involves providing both a default \u003ccode\u003evalue\u003c/code\u003e and \u003ccode\u003elocalized_value\u003c/code\u003e entries within the \u003ccode\u003eText\u003c/code\u003e message, enabling the system to display the appropriate text based on the user's locale.\u003c/p\u003e\n"],["\u003cp\u003eIf localization is not supported, it's crucial to specify the \u003ccode\u003elocalized_value\u003c/code\u003e and \u003ccode\u003elocale\u003c/code\u003e with the supported language, while also setting the default \u003ccode\u003evalue\u003c/code\u003e for fallback purposes.\u003c/p\u003e\n"]]],["Localization is strongly recommended in the Actions Center Reservations integration. Fields using the `Text` message can be localized by specifying a `localized_value` for each supported language and a default `value`. The user's locale, from their browser settings, determines which `localized_value` is displayed. If the user's locale isn't found, the provided `value` is the default. If `value` is not set, the first value from `localized_value` is used. Even for single-language support, set both `value` and `localized_value`.\n"],null,["# Specify localized texts\n\nIt is highly recommended to support localization in the Actions Center Reservations End-to-End\nintegration. Users are shown a localized experience based on their language\nsettings. If no localization is set, the default text may be shown to the\nuser. You are able to provide localized text for many fields in the\nintegration, such as service names and descriptions. Please refer to our\n[feed\nspecification](/actions-center/verticals/reservations/e2e/integration-steps/feeds) for the full list of fields that can be localized by using the\n`Text` message.\n\nImplementing localization\n-------------------------\n\n```mysql\n// A possibly-localized text payload. Some Text fields may contain marked-up\n// content.\nmessage Text {\n // Required. Text value in an unknown locale, which will be displayed if\n // `localized_value` for the user locale is empty or missing. The locale for\n // this value may depend on the partner or service provider, and it should not\n // be assumed to be any specific language.\n string value = 1;\n\n // Per-locale text values. Required.\n repeated LocalizedString localized_value = 2;\n}\n```\n\nAny field in the feeds that uses a `Text` message can be localized by providing\na `localized_value` for each supported language.\n\nIt is required to specify both the `value` and\n`localized_value`.\n\n- We will show the `localized_value` based on the user's locale (which is set in the user's language browser settings).\n- Value will be used as a default when the user's locale is not in your list of supported localizations\n - Should you not define value and the users locale is not in your list of supported localizations we will use the first value present in localized_value. While this fallback is available it is strongly recommend for you to specify the default value explicitly.\n\nIf you do not support localization in your system, please set\n`localized_value` and set `locale` with the only\nlanguage you support. Set `value` as well which may be used as a\ndefault.\n\nExample Services Feed Snippet\n-----------------------------\n\n```scdoc\n \"localized_service_name\": {\n \"value\": \"Chocolate Tasting\",\n \"localized_value\": [\n {\n \"locale\": \"en\",\n \"value\": \"Chocolate Tasting\"\n },\n {\n \"locale\": \"fr\",\n \"value\": \"Dégustation de chocolats\"\n }\n ]\n }\n```"]]