mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Internationalization followup (#500)
* add translations in data.ts * add language list add spanish version * fixes pr review * add more translations * remove unused label Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
parent
362cd74a9b
commit
a436e70764
9 changed files with 206 additions and 32 deletions
|
@ -80,7 +80,8 @@ import { ToolIcon } from "./components/ToolIcon";
|
|||
import { LockIcon } from "./components/LockIcon";
|
||||
import { ExportDialog } from "./components/ExportDialog";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import "./i18n";
|
||||
import { LanguageList } from "./components/LanguageList";
|
||||
import i18n, { languages, parseDetectedLang } from "./i18n";
|
||||
|
||||
let { elements } = createScene();
|
||||
const { history } = createHistory();
|
||||
|
@ -1261,6 +1262,15 @@ export class App extends React.Component<any, AppState> {
|
|||
document.documentElement.style.cursor = hitElement ? "move" : "";
|
||||
}}
|
||||
/>
|
||||
<div className="langBox">
|
||||
<LanguageList
|
||||
onClick={lng => {
|
||||
i18n.changeLanguage(lng);
|
||||
}}
|
||||
languages={languages}
|
||||
currentLanguage={parseDetectedLang(i18n.language)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue