[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eDialogflow allows for the creation of multilingual agents by supporting both root languages (e.g., English) and locale-specific languages (e.g., English-US).\u003c/p\u003e\n"],["\u003cp\u003eWhen building a multilingual agent, text-based data for end-user interaction, such as intent training phrases and entity entries, must be provided specifically for each language.\u003c/p\u003e\n"],["\u003cp\u003eYou can access language-specific data through the Dialogflow console by selecting the language button or via the API by using the \u003ccode\u003elanguageCode\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow automatically determines the input language for a request and responds in that language if automatic language detection is enabled, otherwise, it uses the default language.\u003c/p\u003e\n"],["\u003cp\u003eText-based and phone gateway integrations will only use the default language of the agent.\u003c/p\u003e\n"]]],[],null,["# Multilingual agents\n\nDialogflow supports many languages.\nFor the complete list, see the\n\n[languages reference page](/dialogflow/es/docs/reference/language).\n\nThe language you choose when creating an agent is set as the default language,\nand you can add additional languages.\n\nRoot and locale-specific languages\n----------------------------------\n\nThere are two categories of languages:\n\n- **Root languages** : These are languages like *English (en)* that do not specify a locale.\n- **Locale-specific languages** : These are languages like *English-US (en-US)* that do specify a locale as a specific region or country.\n\nSome languages act as both root and locale-specific.\nThere are significant differences between locales for these languages,\nso the locales cannot share a common root language.\nExamples:\n\n- Chinese-Cantonese (zh-HK)\n- Chinese-Simplified (zh-CN)\n- Chinese-Traditional (zh-TW)\n- Portuguese-Brazil (pt-BR)\n- Portuguese-Portugal (pt)\n\nYou should primarily design your agent for root languages,\nand only customize for locale-specific languages as needed.\n\nAdd a language\n--------------\n\n| **Note:** As a best practice, you should complete your agent in the default language before adding additional languages.\n\nTo add a language or locale with the Dialogflow ES console Console:\n\n1. In the left sidebar menu, click the add language *add* button next to the existing language(s). \n This takes you to the **Languages** tab of agent settings.\n2. Choose a language from the **Select Additional Language** dropdown menu.\n3. To add a locale, hover over a root language and click **+ Add locale**.\n4. Click **Save**.\n\nLanguage-specific data\n----------------------\n\n| **Note:** The information in this section applies to both locale-specific and root languages. For example; `en`, `en-US`, and `en-GB` each have unique data for intent training phrases.\n\nMost agent data is common for all languages of a multilingual agent.\nHowever, text used to interact with an end-user is language-specific.\nWhen building a multilingual agent, you must supply this language-specific data\nfor each language. When you select a language from the console or provide a\nlanguage to the API, you can access this language-specific data for the given\nlanguage. The following is a complete list of language-specific data:\n\n- [intent training phrases](/dialogflow/es/docs/intents-training-phrases)\n- [intent responses](/dialogflow/es/docs/intents-responses)\n- [entity entries](/dialogflow/es/docs/entities-overview)\n\nTo access language-specific data with the console,\n\nclick the language button under the agent name.\n\n\nFor example, the *size* entity type below is used for ordering t-shirts.\nThe agent was originally configured in English, so the entity has entries like\n\"S\" with the synonym \"small\". When Spanish is added as a language,\nthe entity is created by Dialogflow for the new language, but you need\nto supply entity entries in Spanish.\n\n### Language-specific data when using the API\n\nTo access language-specific data with the API,\nprovide the `languageCode` parameter when getting, creating, or updating\n\n[EntityType](/dialogflow/es/docs/reference/common-types#entitytypes)\nor\n[Intent](/dialogflow/es/docs/reference/common-types#intents)\ntypes.\n\n\nYou must make separate API calls\nfor each language to access all language-specific data.\nIf your API calls update language-generic data,\nthat data is updated for all languages.\n\nTest in the simulator\n---------------------\n\nWhen using the\n\n[simulator](/dialogflow/es/docs/console#simulator),\n\nchoose the language you want to use by selecting it below the agent name.\n\nSupply a language using the API\n-------------------------------\n\nWhen sending requests via the API, set the\n\n`queryInput.input.languageCode`\n\nfield of the `detectIntent` method.\nFor more information, see the\n\n[`Sessions`](/dialogflow/es/docs/reference/common-types#sessions) type.\n\n\nRequests that do not supply an agent's language\n-----------------------------------------------\n\nWhen Dialogflow receives a request\nthat does not supply a language supported by the agent,\nthe following rules apply:\n\n- When a request does not supply a language, Dialogflow automatically determines the input language and responds in that language **if automatic language detection is enabled**. If automatic language detection is disabled, Dialogflow handles the request using the default language.\n- When a request supplies a locale-specific language that is not supported by the agent, but the associated root language is supported by the agent, Dialogflow handles the request using the root language.\n- System entity extraction is an exception to the previous rule. System entity extraction uses the supplied locale-specific language, even if the locale-specific language is not supported by the agent.\n\nIntegrations\n------------\n\nAgent interactions through text-based\n\nand phone gateway\n[integrations](/dialogflow/es/docs/integrations)\n\nonly use the default language of the agent."]]