wp-get-l10n

1.0.0 • Public • Published

💬 wp-get-l10n

Extract WordPress Localization Text.

Install

#Yarn 
yarn add wp-get-l1on
 
#NPM 
npm install wp-get-l1on --save

Usage

const getL1onText = require('wp-get-l1on')
 
// Output: My String
console.log(getL1onText('__( "My String", "text-domain" )'))
 
// Output: { single: '% comment', plural: '% comments' }
console.log(getL1onText('_n( "%s comment", "%s comments", $comments_count, "text-domain" )'))
 
// Output: { text: 'My String', context: 'context' }
console.log(getL1onText('_x( "My String", "context", "text-domain" )'))

License

MIT (c) oknoorap

Readme

Keywords

Package Sidebar

Install

npm i wp-get-l10n

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • oknoorap