mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-28 02:30:57 +02:00
localizing is now pretty nice
This commit is contained in:
7
components/localized/LocaleSwitcher/content.en-GB.md
Normal file
7
components/localized/LocaleSwitcher/content.en-GB.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Read this in your own language:
|
||||
|
||||
- [English](?locale=en-GB)
|
||||
- [日本語](?locale=ja-JP)
|
||||
- [中文](?locale=zh-CN)
|
||||
|
||||
Don't see your language listed? [Help translate this content!](https://github.com/Pomax/BezierInfo-2/wiki/localize)
|
9
components/localized/LocaleSwitcher/index.js
Normal file
9
components/localized/LocaleSwitcher/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
var React = require('react');
|
||||
|
||||
var Locale = require("../../../lib/locale");
|
||||
var locale = new Locale();
|
||||
var page = "locale-switcher";
|
||||
|
||||
module.exports = function(props) {
|
||||
return <div className="locale-switcher">{ locale.getContent(page, this) }</div>;
|
||||
};
|
3
components/localized/index.js
Normal file
3
components/localized/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
"LocaleSwitcher": require("./LocaleSwitcher")
|
||||
};
|
Reference in New Issue
Block a user