1.0.1 • Published 2 years ago

wtf-plugin-i18n v1.0.1

Weekly downloads
26
License
MIT
Repository
github
Last release
2 years ago

This plugin adds support for many additional multi-language templates in wtf_wikipedia.

const wtf = require('wtf_wikipedia')
wtf.extend(require('wtf-plugin-i18n'))

//'flag' template in arabic wikipedia
wtf('hello world {{علم|EU}}').text()
// 'hello world 🇪🇺'

let doc = wtf(`{{Cita libru |url=cool.com |title= citation template }}`)
doc.references().length
// 1
<script src="https://unpkg.com/wtf_wikipedia"></script>
<script src="https://unpkg.com/wtf-plugin-i18n"></script>
<script defer>
  wtf.plugin(window.wtfI18n)
  wtf.fetch('https://de.wikipedia.org/wiki/Hamburg').then((doc) => {
    console.log(doc.coordinates())
  })
</script>

work-in-progress

MIT

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

4 years ago

0.0.1

4 years ago