# Web XML

> Web XML file localization

URL: https://store.crowdin.com/webxml
Identifier: webxml
Category: File Formats
Type: System
Author: Crowdin

WebXML is a Crowdin-developed XML format designed for translating data structures that may contain HTML or XML formatting. When uploaded to Crowdin, it presents data structures to linguists with comprehensive context, ensuring they understand how the data is used. High-quality context significantly contributes to achieving optimal translation quality.



Here's a preview of a Web XML file as it appears to linguists in the Crowdin Editor.



![](https://developers.app.crowdin.net/api/media/file/0478c0a4-e232-4d0e-b067-03f9652d78f0.png)



**Note**: To upload Web XML, use the API or CLI and set the file type to "webxml".



## Structure

There are no strict requirements for WebXML file structure, but the format follows several key concepts:



### Core Requirements

* Must be valid XML

* XML attributes are neither visible nor translatable

  * Can be used to store ID references or data needed for WebXML conversion

* HTML or XML content must be either:

  * HTML encoded, or

  * Enclosed in CDATA sections



### Reserved Attributes

The following attributes are reserved for specific functionality:



* `crowdinContext` - Provides contextual information for the segment

* `crowdinTitle` - Specifies a tag name to display in the WYSIWYG editor

* `crowdinKey` - Defines a Crowdin Key for the segment from the XML node

* `crowdinMaxLength` - Defines the maximum length of the translation for this node.

* `translatable` - Controls whether node value can be translated

* `crowdinType` - Specifies a format (e.g., `crowdinType="json"`) to process the node with a different parser (requires segmentation to be disabled in the WebXML parser configuration).

## File Format Details

| Attribute | Value |
| --------- | ----- |
| File Extension | .xml |
| [API Type](https://developer.crowdin.com/api/v2/#operation/api.projects.files.post) | webxml |
| Source can be edited in Crowdin | No |
| Generating translated files via [Bundles](https://support.crowdin.com/bundles/) | [Search Crowdin Store](https://store.crowdin.com/tags/string-exporter) |
| Supports pluralization | No |
| WYSIWYG Preview in the editor | Yes |
| Supported types of contextual information | Text comments, Screenshots |
| Custom attributes | No |
| Existing translations import possibility | ML-based technology |

## Sample File

```xml
<?xml version="1.0"?>
<content>
        <anyTagName>
                <text>
                        <![CDATA[
<div style="width: 46%; float: left; padding: 0px 10px 0 0; color: #444; line-height: 20px;">
    <p>
        This is a paragraph with some content for translation. <br />
        Some introductory text before the ordered list: 
    </p>
    <ul>
        <li>List item #1.</li>
        <li>List item #2.</li>
        <li>List item #3.<br /></li>
    </ul>
</div>
]]>
        
                </text>
                <error-page>
                        <error-code>500</error-code>
                        <location>/error500.html</location>
                        <pre>
                This section is preformatted and preserves whitespace and line breaks. 
                It's commonly used for displaying code snippets
            </pre>
                </error-page>
                <field_name crowdinTitle="PreviewFieldName" crowdinContext="useful context that linguists should know about" crowdinKey="segment_key" >This is also some content for translation.</field_name>
                <any_tag_name translatable="false">Display but do not translate</any_tag_name>
        </anyTagName>
</content>
```
