WordPress doesn’t quite have a practice of localizing something that isn’t core/plugin/theme.
My educated guess would be that it will work just fine with same concepts, but you will have to write custom loading logic. Use lower level load_textdomain()
, since higher level functions are meant for plugins/themes specifically.
As long as you determine and load domain translation correctly, WordPress wouldn’t care that calls are coming from the library context.
Related Posts:
- How to find which .mo file is responsible for displaying a particular localized string?
- How does printf( __( ) ); work?
- Why include a composer.json file with my plugin?
- Autoloading in Child Theme
- Namespacing WordPress project according to FIG standards
- Who’s job is it to load a plugin’s translated strings?
- Use composer to load custom classes [closed]
- How do I translate this string – PHP syntax question
- Proper use of internationalization
- How to register javascript variables in wp_localize_script?
- How to Internationalize WordPress – Extract strings with textdomains, per textdomain individually
- Decimal values via get_option() with custom local (decimal point = comma)
- Plugin development and composer
- How can I search all plugins for composer’s vendor/autoload.php?
- Composer setup-config.php not found
- Prevent Company Name From Translating
- PHP Warning missing Argument 1 for __()
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- How to add a php package to an existing wordpress website
- Why does WordPress not make use of gettext directly?
- i18n in WordPress Theme
- How to edit homepage in WordPress?
- Adding Custom JQuery Menu Fresh Slide Out
- How to quickly/easily make an analysis (reverse engineering) of WordPress?
- php nested IF statements to hide content (possible syntax error) [closed]
- problem with php function error
- Errors while Loading Most Recent Version of jQuery
- Integrating CSS Into a WP Function Call [closed]
- WordPress menu links with images & class selection
- How can a ‘scripts’ directory be hooked into wp_head();?
- Use php array outside his function
- Fix incorrect related posts code snippet
- Comment section not appearing on posts with no comments
- Specific php document for a page
- HTML in PHP problem [closed]
- How to handle PHP parse errors?
- which table updated after logout?
- Implement “No related posts for this entry” into the loop?
- PHP code for link with text
- wc_add_notice not working on cart page
- Order woo products, but first products must be with acf fields
- How to convert my comment.html to comment.php
- Why not showing all post by default in my jquery filter
- php-page with db connection
- how to add display_name
- how to convert wordpress query to pdo query
- how to import contacts from php to wordpress
- Remove /category/ from category (archive) page URLs (without using a plugin)
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- Display a list of posts corresponding to a category
- How to add active class dynamically
- Gravity Forms – Prevent Multiple Form Entries Same User ID with Same Field Value
- Change background image based on tags
- How keep woocommerce users separeted in multisite install and keep admins on network
- ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?
- How to show only part of product name in category page – WordPress with woocomerce
- Setting WooCommerce currency programmatically
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- Particular meta tag – viewport – insertion when dealing with plugin
- For each loop will not append to the_content hook
- Masking external links with internal link for member-only
- Forbid certain users to access a specific page
- ACF repeater image in video poster with jquery
- Metadata on the WP_Post object
- Getting custom field data from cart page to checkout page in woocomerce [closed]
- How to customize posts in WordPress by using HTML and CSS?
- How to display the date under the post title?
- PHP Use Declared array Variable inside already Declared Array
- How to create and add js and css file when server is not on my PC?
- Load Meta box value into div AJAX [duplicate]
- How to return a Boolean for a page that is a subpage thru its name?
- Object of class WP_Post could not be converted to string while trying to console.log wp_get_nav_menu_items
- Running self host server on Ubuntu, can’t increase upload limit past 2MB, tried all the solutions
- Reading CSV values and showing them in PHP
- send meta box input data without publish button
- how to iterate through xml data?
- How to show value from ACF plugin field in e-mail?
- A next page function with shortcode?
- session_start(): Cannot find save handler ‘mm’ – session startup failed in /sites
- Check radio get value to array
- Adding slides to an existing carousel manually
- Where to store the images of a custom WordPress theme?
- How to dynamically change webcam photo timestamps
- How to replace wp-admin login page to another location?
- Shortcode to include PHP file, pass various parameters to include?
- How to find the value of the user password in wordpress and send it to another server via rest api
- Exclude specific product tags from related products in WooCommerce 3+ [closed]
- wp_query on search results page showing all results every time
- Why can’t I include echo inside a variable? [closed]
- WP_Query not returning results
- WooCommerce Orders pagination
- Problem with function.php.. like
- Simple Probléme in wordpress
- Custom Registration and Login Forms with reCaptcha 2 Validation
- image dimension in php code args
- How to add pagination for wordpress home page
- Import and use a variable in additional settings of Contact Form 7 [closed]
- which php or css file has generated an inline style in WordPress that overwrites my css
- Change Checkout “Place Order” text if cart has a specific product
- php inside HTML via shortcode? [closed]