https://github.com/oknoorap/wp-get-l10n
:speech_balloon: Extract WordPress Localization Text.
https://github.com/oknoorap/wp-get-l10n
nodejs wordpress
Last synced: 2 months ago
JSON representation
:speech_balloon: Extract WordPress Localization Text.
- Host: GitHub
- URL: https://github.com/oknoorap/wp-get-l10n
- Owner: oknoorap
- License: mit
- Created: 2017-09-02T05:21:25.000Z (almost 9 years ago)
- Default Branch: develop
- Last Pushed: 2017-09-02T13:59:06.000Z (almost 9 years ago)
- Last Synced: 2025-12-25T04:46:18.373Z (6 months ago)
- Topics: nodejs, wordpress
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :speech_balloon: wp-get-l10n
> Extract WordPress Localization Text.
## Install
```bash
#Yarn
yarn add wp-get-l1on
#NPM
npm install wp-get-l1on --save
```
## Usage
```javascript
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](https://github.com/oknoorap)