PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.13
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.13
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
disco / vendor / micropackage / internationalization / README.md

README.md in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.13, at vendor/micropackage/internationalization/README.md

67 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Internationalization
2
3 [](https://bracketspace.com![BracketSpace Micropackage](https://img.shields.io/badge/BracketSpace-Micropackage-brightgreen)](https://bracketspace.com](https://bracketspace.com)
4 [](https://packagist.org/packages/micropackage/internationalization![Latest Stable Version](https://poser.pugx.org/micropackage/internationalization/v/stable)](https://packagist.org/packages/micropackage/internationalization](https://packagist.org/packages/micropackage/internationalization)
5 [](https://packagist.org/packages/micropackage/internationalization![PHP from Packagist](https://img.shields.io/packagist/php-v/micropackage/internationalization.svg)](https://packagist.org/packages/micropackage/internationalization](https://packagist.org/packages/micropackage/internationalization)
6 [](https://packagist.org/packages/micropackage/internationalization![Total Downloads](https://poser.pugx.org/micropackage/internationalization/downloads)](https://packagist.org/packages/micropackage/internationalization](https://packagist.org/packages/micropackage/internationalization)
7 [](https://packagist.org/packages/micropackage/internationalization![License](https://poser.pugx.org/micropackage/internationalization/license)](https://packagist.org/packages/micropackage/internationalization](https://packagist.org/packages/micropackage/internationalization)
8
9 <p align="center">
10 <img src="https://bracketspace.com/extras/micropackage/micropackage-small.png" alt="Micropackage logo"/>
11 </p>
12
13 ## 🧬 About Internationalization
14
15 The Internationalization micropackage is an unified wrapper for both `load_plugin_textdomain` and `load_theme_textdomain` functions.
16
17 It can handle both theme and plugin language packs but also any other 3rd party library, like a translated Composer package.
18
19 The language file must follow the scheme: `{textdomain}-{locale_LOCALE}.mo`.
20
21 This package is compatible with [](https://github.com/micropackage/dochooksDocHooks library](https://github.com/micropackage/dochooks](https://github.com/micropackage/dochooks).
22
23 ## 💾 Installation
24
25 ``` bash
26 composer require micropackage/internationalization
27 ```
28
29 ## 🕹 Usage
30
31 Call the action manually:
32
33 ```php
34 use Micropackage\Internationalization\Internationalization;
35
36 add_action( 'init', [ new Internationalization( $textdomain, $full_language_dir_path ), 'load_translation' ] );
37 ```
38
39 Using [](https://github.com/micropackage/dochooksDocHooks library](https://github.com/micropackage/dochooks](https://github.com/micropackage/dochooks):
40
41 ```php
42 Micropackage\DocHooks\Helper::hook( new Internationalization( $textdomain, $full_language_dir_path ) );
43 ```
44
45 Retrieving full path to the directory:
46
47 ```php
48 $theme_language_dir = get_template_directory() . '/languages';
49 $plugin_language_dir = plugin_dir_path( __FILE__ );
50 ```
51
52 ## 📦 About the Micropackage project
53
54 Micropackages - as the name suggests - are micro packages with a tiny bit of reusable code, helpful particularly in WordPress development.
55
56 The aim is to have multiple packages which can be put together to create something bigger by defining only the structure.
57
58 Micropackages are maintained by [](https://bracketspace.comBracketSpace](https://bracketspace.com](https://bracketspace.com).
59
60 ## 📖 Changelog
61
62 [](./CHANGELOG.mdSee the changelog file](./CHANGELOG.md](./CHANGELOG.md).
63
64 ## 📃 License
65
66 This software is released under MIT license. See the [](./LICENSELICENSE](./LICENSE](./LICENSE) file for more information.
67