שאלו את שאלתכם וקבלו סיכום של המסמך על ידי הפניה לדף הזה ולספק ה-AI שתבחרו
התוכן של הדף הזה תורגם באמצעות AI.
צפייה בגרסה האחרונה של התוכן המקורי באנגליתאם יש לכם רעיון לשיפור התיעוד הזה, אל תהססו לתרום על ידי הגשת Pull Request ב-GitHub.
קישור GitHub לתיעודהעתקת ה-Markdown של המסמך ללוח
Extract strings
העתקת הקוד ללוח
This command analyzes your code files to extract strings from components into a .content file close to the component. It supports interactive file selection or specific file targeting.
Aliases:
npx intlayer ext
Arguments:
File selection options:
-f, --file [files...]: List of specific files to extract. If not provided, the CLI will scan for matching files (**/*.{tsx,jsx,vue,svelte,ts,js}) and prompt you to select which ones to extract.Example:
npx intlayer extract -f src/components/MyComponent.tsx--code-only: Only extract the component code (do not write content declaration).Example:
npx intlayer extract --code-only--declaration-only: Only generate content declaration (do not rewrite component).Example:
npx intlayer extract --declaration-only
Configuration options:
--base-dir: Specify the base directory for the project.--env: Specify the environment.--env-file: Provide a custom environment file.--verbose: Enable verbose logging.--ci: Run the command in every Intlayer project of the monorepo (or only the current one when run from a project directory). Per-project credentials can be injected viaINTLAYER_PROJECT_CREDENTIALS, a JSON map of project path to{ "clientId", "clientSecret" }.
Required plugins:
The extract command works without additional plugin on TypeScript / JSX files. However, it requires the following plugins to be installed for Vue and Svelte projects:
@intlayer/vue-compiler: For Vue files.@intlayer/svelte-compiler: For Svelte files.
