بسته های اقدام (Dialogflow)
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
میتوانید با ایجاد بستههای Action جداگانه برای هر منطقه و سپس آپلود آنها در پروژه Actions خود با ابزار gactions
با Actions SDK اقدامهای محلی ایجاد کنید.
برای ایجاد کنشهای محلی شده با Actions SDK:
- برای هر محلی که میخواهید پشتیبانی کنید، بستههای Action جداگانه ایجاد کنید، و نامهای محلی مانند
action.de.json
و action.en.json
را به آنها بدهید. از طرف دیگر، میتوانید زیر شاخههایی را برای بستههای Action محلی و سایر فایلهای منبع در پروژه خود ایجاد کنید. - عنصر
locale
را در بالای بسته Action خود با زبان یا محلی که می خواهید پشتیبانی کنید اضافه کنید. علاوه بر این، الگوهای پرس و جوی محلی را برای Actions خود ارائه دهید، تا کاربران بتوانند آنها را به درستی برای محلی که در آن هستند فعال کنند. به عنوان مثال: {
"locale": "de",
"actions": [
{
"intent": {
"name": "actions.intent.MAIN",
"trigger": {
"queryPatterns": [
"<Insert German query patterns here>"
]
}
}
}
]
}
- از ابزار
gactions
برای آپلود بستههای Action خود در پروژه Actions خود استفاده کنید، و هر یک از بستههای Action محلی خود را مشخص کنید. به عنوان مثال: ./gactions update --project my-project-id --action_package action.de.json --action_package action.en.json --action_package action.fr.json --action_package action.ja.json --action_package action.ko.json
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-08 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-08 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eOAuth and Google Sign-In linking combines Google's authentication with custom logins for flexibility.\u003c/p\u003e\n"],["\u003cp\u003eThis linking type is ideal for Actions needing cross-platform functionality and support for non-Google accounts.\u003c/p\u003e\n"],["\u003cp\u003eUsers can create accounts using their Google profile, link existing accounts, or sign in with other providers.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can choose between authorization code or implicit flow based on security and implementation complexity.\u003c/p\u003e\n"],["\u003cp\u003eAccount linking flows adapt based on service settings and user accounts to create secure and personalized experiences.\u003c/p\u003e\n"]]],[],null,["# Action packages (Dialogflow)\n\nYou can create localized Actions with the Actions SDK by creating separate\nAction packages for each locale and then uploading them to your Actions project\nwith the `gactions` tool.\n\nTo create localized Actions with the Actions SDK:\n\n1. Create separate Action packages for each locale that you want to support, giving them localized names such as `action.de.json` and `action.en.json`. Alternatively, you can create subdirectories in your project for your localized Action packages and other resource files.\n2. Add the `locale` element at the top of your Action package with the language or locale that you want to support. In addition, provide localized query patterns for your Actions, so that users can trigger them properly for the locale they are in. For example: \n\n ```text\n {\n \"locale\": \"de\",\n \"actions\": [\n {\n \"intent\": {\n \"name\": \"actions.intent.MAIN\",\n \"trigger\": {\n \"queryPatterns\": [\n \"\u003cInsert German query patterns here\u003e\"\n ]\n }\n }\n }\n ]\n }\n ```\n3. Use the [`gactions`](/assistant/df-asdk/actions-sdk/gactions-cli) tool to upload your Action packages to your Actions project, specifying each of your localized Action packages. For example: \n\n ```\n ./gactions update --project my-project-id --action_package action.de.json --action_package action.en.json --action_package action.fr.json --action_package action.ja.json --action_package action.ko.json\n ```"]]