Is it possible to display
<!-- plugin version 123 (Fr) -->
if the
language is French?
Yes, it is possible and you can use get_bloginfo( 'language' )
which returns a language tag like en-US
for English (US)
.
So if you just want to retrieve the first 2-or-3 character code (e.g. en
for en-US
and en-UK
) of the language tag, you can do:
list ( $lang ) = explode( '-', get_bloginfo( 'language' ) );
echo '<!-- plugin version 123 (' . ucfirst( $lang ) . ') -->';
Related Posts:
- How to keep plugin translations after updates?
- Edit plugin without hooks in functions.php
- How to use load_plugin_textdomain from within a theme
- Why load_textdomain work but not load_plugin_textdomain?
- Language Translation is not working?
- allow arabic letters when register new account
- WordPress language switcher
- How to set a custom title per language?
- Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?
- load_theme_textdomain path
- Change the backend language of a single plugin
- WordPress change Language not working
- Force language in translate function
- Can a plugin be run in a different language than WordPress?
- How to handle a WordPress blog with articles in different languages?
- Language translation on a fresh english installation
- Change language in SiteOrigin Widgets
- I have English words in Kurdish pages
- How to translate wordpress blog to other languages?
- How to change WordPress core language using Loco Translate?
- WPML – Hook when language is switched (change user language)
- How do I add languages?
- Function get_locale always returns en_US in plugin?
- How do I change a plugin language of only one page?
- Translation plugin with default language?
- Change localization only for plugin
- How to get the list of languages provided by a plugin
- WordPress Site in Multiple Languages
- GTranslate Plugin – Showing Different Codes With if-else
- How to customize woocommerce related products? [closed]
- Pass PHP variable to javascript
- Get a button for in the Editor
- Plugin not showing in dashboard
- How to create gutenberg block using REST API independently or as headless way?
- How can i force Display names to be the same as Usernames?
- What areas to Unit test while building a plugin?
- How to automatically add and show(open) all the product attributes?
- Notify commenters about new replies
- Woocommerce different URL for every table placed in the restaurant
- Disable Admin Bar Render on Plugin Page
- Custom field in TWIG template – Advanced custom fields plugin
- How to get all events from ‘All in one Events calender’ plugin in JSON format?
- How to migrate from Mark Jaquith’s Subscribe to Comments plugin to Gurken’s new version?
- Current user in plugin returns NULL
- How to structure a plugin into multiple files using classes?
- WordPress logo upload option in theme panel
- Woocommerce – Display active variation product price [closed]
- Gravatar images are not fetched in Ultimate Member plugin
- WordPress performance – W3 Total Cache and memcached/APCu
- qTranslate conflicts with SEO-plugins [closed]
- Multi language site [closed]
- How can I disable widget from being visible on some pages?
- Override Plugin Script Fucnction in WordPress
- Want to Show Sub categories under Categories section using Woo Commerce [closed]
- How to customize the grid layout in reactive pro wordpress plugin [closed]
- Why do plugins deactivate by themselves?
- WordPress page and plugin list using sql query
- Xili language plugin not showing language flag [closed]
- Is there a WordPress plugin that can post to Google+? [closed]
- WordPress checkbox and Illegal string offset
- Undefined index: action plugin problem
- Infinite scroll messing up nth:of-type
- Problem installing plugin: unexpected T_STRING, expecting T_FUNCTION
- Problem with add_action
- Chrome Dev Tools console says every page in my blog has link to http://maps.google.com [closed]
- Plugin not properly prepared for localization
- How to rename WP plugin?
- how can authors to define custom pages?
- Polldaddy doesn’t show up on own theme
- Send a Notification to a WordPress Theme
- Gathering all Custom Post Type posts in to array/object the proper way
- What plugins can I use to feature (affiliate) products on my blog (from Amazon.com)?
- How to upload large media file in chunks, without any plugin?
- Redirect unloggedin users
- Problem with WordPress Elementor linked image and Round Corners Going Square Again
- Change language on website and change currency with url query
- How to use functions found inside pluggable.php with my plugin files
- Apply only the css in my style.css file
- how to upload folders and files to google storage bucket?
- WooCommerce or any other plugin: Deliver JS and CSS through CDN without using a Plugin
- How to roll back WordPress version or prevent migration from forcing update?
- Multisite converted to Single Site can’t add new plugins or new themes
- WordPress arrows dissapeared strange signs
- Category as Subdomain for One WP Install
- How to show Conditional Statement In CMB2 for input text?
- How to enable Admins to see Plugins
- Getting error Parse error: syntax error, unexpected ‘add_filter’ (T_STRING), expecting function (T_FUNCTION)
- MobilePress plugin and WordPress 4.1 update
- Theme styling for plugins
- jquery-issue: cannot load the basic jquery
- How to remove post redirects
- Possible jquery / library conflict in plugin usage
- Unwanted Links and Spam WordPress Pages and Posts
- Display Plugin information on specific url
- Displaying single Instagram images as a tile
- How to add plugin to blog [closed]
- How often should I execute add_filter and function declaration in Code Snippets?
- Running a function using Crown WordPress on one day a week, for example, Mondays of every week
- Ad Management Plug that can be used on a membership site
- How do I remove the filter from the orders and add custom status in Dokan?