Skip to content

Commit 9c5fb4e

Browse files
committed
Added basic translation description
1 parent 36299df commit 9c5fb4e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.markdown

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ recent (or slightly less than recent) versions of Safari.
7474

7575
See the <code>Contrib/PhantomJS/HTMLCS_Run.js</code> file for more information.
7676

77-
#### Node & JSDom.
77+
#### Node & JSDom
7878

7979
HTML_CodeSniffer requires a dom to run, however, it is possible to run it entirely
8080
server side without a headless browser using Node on arbitrary fragments of HTML using
@@ -102,6 +102,21 @@ jsdom.env({
102102
});
103103
```
104104

105+
### Translations
106+
107+
HTML_CodeSniffer supports _very_ basic string translations. The auditor will use the current language of the document it is being run in (e.g. `<html lang="en">`). A language code can be supplied if you need to tell HTML_CodeSniffer which language you want to use.
108+
109+
Example usage:
110+
```javascript
111+
HTMLCSAuditor.run('WCAG2AA', null, {
112+
lang: 'pl'
113+
});
114+
```
115+
116+
**Note:** HTML_CodeSniffer only has english (default) and polish language.
117+
118+
If other language support is required a custom version can be built by adding more translations in `Translations/<code>.js` and using the grunt build process described above.
119+
105120
### Contributing and reporting issues
106121

107122
To report any issues with using HTML_CodeSniffer, please use the

0 commit comments

Comments
 (0)