.. | ||
img | ||
src | ||
tests | ||
.babelrc | ||
.editorconfig | ||
.gitignore | ||
.npmignore | ||
.travis.yml | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
rollup.config.js |
freesewing
a library for made-to-measure sewing patterns
plugin-i18n
A freesewing plugin to provide translation to your patterns.
Install
On node.js:
npm install @freesewing/plugin-i18n
in the browser, simply include the plugin from unpkg:
<script type="text/javascript" src="https://unpkg.com/@freesewing/plugin-i18n"></script>
This plugin will register as freesewing.plugins.i18n
.
Loading this plugin and providing translation data
This plugin does not come with translations. You should provide the translations when registering the plugin.
Perhaps you want to use your own translations, or you can use ours from the
@freesewing/i18n package.
Note that if you use ours, you only need to add the plugin
export:
import brian from '@freesewing/brian';
import i18nPlugin from '@freesewing/plugin-grainline';
import { plugin } from '@freesewing/i18n';
const pattern = new Brian().with(i18nPlugin, {
prefix: "plugin.",
strings: plugin
});
Build
To build this plugin, run:
npm run build
License: MIT
See the license file for details.