You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.markdown
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ recent (or slightly less than recent) versions of Safari.
74
74
75
75
See the <code>Contrib/PhantomJS/HTMLCS_Run.js</code> file for more information.
76
76
77
-
#### Node & JSDom.
77
+
#### Node & JSDom
78
78
79
79
HTML_CodeSniffer requires a dom to run, however, it is possible to run it entirely
80
80
server side without a headless browser using Node on arbitrary fragments of HTML using
@@ -102,6 +102,21 @@ jsdom.env({
102
102
});
103
103
```
104
104
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
+
105
120
### Contributing and reporting issues
106
121
107
122
To report any issues with using HTML_CodeSniffer, please use the
0 commit comments