Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanwimmer128/sprintf-formatter
Sprintf Formatter - use sprintf for formating vue-i18n translations
https://github.com/stefanwimmer128/sprintf-formatter
Last synced: 2 days ago
JSON representation
Sprintf Formatter - use sprintf for formating vue-i18n translations
- Host: GitHub
- URL: https://github.com/stefanwimmer128/sprintf-formatter
- Owner: stefanwimmer128
- License: isc
- Created: 2020-04-09T12:18:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T06:41:47.000Z (about 2 years ago)
- Last Synced: 2024-04-26T12:43:08.389Z (9 months ago)
- Language: JavaScript
- Homepage: https://yarn.pm/sprintf-formatter
- Size: 558 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sprintf Formatter
Use [sprintf](https://github.com/alexei/sprintf.js/) for formating vue-i18n translations
## Install
``` bash
yarn add sprintf-formatter
npm i sprintf-formatter
`````` html
```
## Usage
``` js
import VueI18n from "vue-i18n";
import SprintfFormatter from "sprintf-formatter";const i18n = new VueI18n({
formatter: new SprintfFormatter(),
/* ... */
});new Vue({
i18n,
/* ... */
});
```or with `nuxt-i18n`:
``` js
/* plugins/vue-i18n.js */import SprintfFormatter from "sprintf-formatter";
export default function vueI18n() {
return {
formatter: new SprintfFormatter(),
/* ... */
};
}
`````` js
/* nuxt.config.js */export default {
modules: [
[
"nuxt-i18n",
{
vueI18n: "@/plugins/vue-i18n.js",
/* ... */
},
],
/* ... */
],
/* ... */
}
```## License
ISC License