... | ... | @@ -170,7 +170,7 @@ The methods in `MathJax.Localization` include: |
|
|
|
|
|
<dl>
|
|
|
<dt>locale</dt>
|
|
|
<dd>the currently selected locale, e.g., <code>"fr"</code></dd>
|
|
|
<dd>The currently selected locale, e.g., <code>"fr"</code>. This is set by the <code>setLocale()</code> method, and should not be modified by hand.</dd>
|
|
|
|
|
|
<dt>directory</dt>
|
|
|
<dd>The URL for the localization data files. This can be overridden for individual languages or domains (see below). The default is <code>[MathJax]/localization</code>.</dd>
|
... | ... | @@ -180,4 +180,39 @@ The methods in `MathJax.Localization` include: |
|
|
|
|
|
</dl>
|
|
|
|
|
|
### Translation Data ###
|
|
|
|
|
|
Each language has its own data in the `MathJax.Localization.strings` structure. This structure holds data about the translation, plus the translated string for each domain.
|
|
|
|
|
|
A typical example might be
|
|
|
|
|
|
fr: {
|
|
|
version: "1.0",
|
|
|
directory: "[MathJax]/localization/fr", // optional
|
|
|
file: "fr.js", // optional
|
|
|
isLoaded: true, // set when loaded
|
|
|
font: "...", // optional
|
|
|
meta: {
|
|
|
translator: "...", // other metadata could be added
|
|
|
},
|
|
|
domains: {
|
|
|
hub: {
|
|
|
version: "1.0",
|
|
|
file: "http://somecompany.com/MathJax/localization/fr/hub.js", // optional
|
|
|
strings: {
|
|
|
fnf: "File '%1' not found",
|
|
|
fl: ["%1 file loaded","%1 files loaded"],
|
|
|
...
|
|
|
}
|
|
|
},
|
|
|
TeX: {
|
|
|
...
|
|
|
},
|
|
|
"*": {
|
|
|
...
|
|
|
},
|
|
|
...
|
|
|
}
|
|
|
|
|
|
|
|
|
## The Translation Files ## |