UserFacingMessage
स्थान-भाषा की जानकारी के साथ, लोगों को दिखने वाला मैसेज भेजें. मैसेज में ज़्यादा से ज़्यादा 4,096 वर्ण हो सकते हैं.
JSON के काेड में दिखाना |
{
"localizedMessages": {
string: string,
...
},
"defaultMessage": string
} |
फ़ील्ड |
localizedMessages |
map (key: string, value: string)
<locale, message> पेयर वाला एक मैप, जहां locale, BCP 47 भाषा का सही कोड होता है. जैसे, en-US, es-ES या fr. ऐसा ऑब्जेक्ट जिसमें "key": value पेयर की सूची होती है. उदाहरण: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
defaultMessage |
string
यह डिफ़ॉल्ट मैसेज तब दिखता है, जब कोई स्थानीय भाषा में मैसेज नहीं दिया जाता है या उपयोगकर्ता की स्थान-भाषा, किसी भी स्थानीय जगह के हिसाब से मैसेज से मेल नहीं खाती. अगर स्थानीय भाषा के मुताबिक मैसेज दिए जाते हैं, तो डिफ़ॉल्ट मैसेज देना ज़रूरी है.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-10-15 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-10-15 (UTC) को अपडेट किया गया."],[[["The JSON representation is used to provide user-facing messages with locale information, with a maximum length of 4096 characters."],["It includes `localizedMessages`, a map of locale codes and corresponding messages, and `defaultMessage` for fallback display."],["A well-formed BCP 47 language code is used for locale specification, and a default message is required if localized messages are provided."]]],["The content defines a JSON structure for user-facing messages with locale support. It includes `localizedMessages`, a map where keys are BCP 47 language codes and values are translated messages. The `defaultMessage` field is a string providing a fallback message when no matching locale is found. `localizedMessages` holds key-value message pairs, and a default message is required if there are any localized ones. The maximum message length is 4096 characters.\n"]]