通过解析器配置功能,您可以更改为 Crowdin 支持的文件格式预定义的默认导入和导出行为。 Parser configuration in a specific project is applied only to files stored in this project. You can set the parser configuration for all files of a certain format or single files. 保存某些文件格式的解析器配置后,您可以将源文件上传到您的项目,Crowdin 将相应地应用您的设置。
You can configure import and export behavior for the following formats: Java Properties, Generic XML, DITA, AsciiDoc, Plain text, MadCap Flare, HTML, Office documents, Adobe FrameMaker, Adobe InDesign, Markdown, and MediaWiki.
Some parameters are common to all formats, while others are format-specific.
In the table below, you can see the available parser parameters and formats they could be configured for.
参数 | 描述 | Format |
---|---|---|
Content segmentation | On import, the source file's content will be split into shorter text segments using predefined segmentation rules (SRX 2.0). | Generic XML, DITA, AsciiDoc, MadCap Flare, HTML, Office documents, Adobe FrameMaker, Adobe InDesign, Markdown |
Custom segmentation rules | 定义您自己的分段规则。 详细了解自定义分段。 Note: The Content segmentation option should be enabled to be able to enable and define Custom segmentation rules. | Generic XML, DITA, AsciiDoc, Plain text, MadCap Flare, HTML, Office documents, Adobe FrameMaker, Adobe InDesign, Markdown, MediaWiki |
Excluded elements | Defines a list of CSS style selectors for elements that should not be available for translation (e.g., code, pre > code, .code-block). Applicable only to block elements. Inline elements are ignored. | HTML, HTML with Front Matter |
Excluded front matter elements | Defines a list of front matter elements that should not be available for translation (e.g., keywords, "internal.description", tags). The path elements should be delimited by a period. The keys containing a period must be enclosed in quotation marks. | HTML with Front Matter, MDX |
Exclude code blocks | Defines whether to import code blocks. Applicable only to code blocks. Inline elements with code are ignored. | MDX |
Translate content | Texts stored inside the tags will be available for translation. | Generic XML |
Translate attributes | Tag attributes will be available for translation. | Generic XML |
Translatable elements | Defines the specific nodes and attributes to be available for translation. Note: If defined, the parameters Translate content and Translate attributes are ignored on import. | Generic XML |
Escape single quote | Defines the behavior regarding a single quote escaping in exported translations. Available options:
| Java 属性 |
Escape special characters | Any special characters (i.e., = , : , ! , # ) will be escaped by a backslash \ in exported translations. | Java 属性 |
Clean tags aggressively | Additional formatting tags related to text spacing will be removed on import. Useful when translating Office documents converted from other formats (e.g., PDF, etc.), and the conversion introduced lots of unnecessary formatting tags. | Office documents |
Translate hyperlink URLs | Hyperlink URLs will be available for translation. | Office documents |
Translate hidden text | The hidden text will be available for translation. | Office documents |
Translate hidden rows and columns | The hidden rows and columns will be available for translation. | Office documents |
Import hidden slides | The hidden slides will be available for translation. | Office documents |
Import notes | The slide notes will be available for translation. | Office documents |
To set the preferred parser configuration for all files of a specific format, follow these steps:
In some cases, you might need to set the parser configuration not for all files of some file format but just for a single file. To set the parser configuration for a single file, follow these steps:
保存文件解析器配置后,Crowdin 将重新导入此文件并应用您的设置。