mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 02:42:41 +02:00
Move references to languages and translated strings out of siteConfig.js into new translation.js module
This commit is contained in:
parent
48916d9f39
commit
099a13a264
9 changed files with 52 additions and 112 deletions
|
@ -7,7 +7,7 @@
|
|||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
const siteConfig = require(process.cwd() + "/siteConfig.js");
|
||||
const translation = require("./translation.js");
|
||||
|
||||
let language = "en";
|
||||
|
||||
|
@ -16,7 +16,7 @@ function setLanguage(lang) {
|
|||
}
|
||||
|
||||
function translate(str) {
|
||||
return siteConfig[language]["pages-strings"][str];
|
||||
return translation[language]["pages-strings"][str];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue