I’m almost sure that you can use locale_get_primary_language
function for that.
echo locale_get_primary_language( $item );
Maybe it’ll need some tweaking, because I’m not sure if formats will match (for example you may have to change ‘‘ to ‘‘ or change it to lower/upper-case).
Related Posts:
- date_i18n() issue
- How to set permalink structure via functions.php
- How to develop a multilingual theme?
- Make a custom theme translate-ready
- Setting up partial Right-to-Left admin interface
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Display site admin profile fields in header.php
- How to test for MU via functions.php?
- Same footer on all multisites blogs
- Excluding a page with a certain name from wp_page_menu
- How can I disable/hide certain themes in multisite?
- Change the template of multiple multisite pages at the same time
- Is it a bad practice to use switch_to_blog in the frontend?
- Link to a .po file in a child theme
- Theme Development for WordPress Multisite Installation
- WordPress empty Nav Menu error
- multisite: global menu containing network site links?
- Can I have two different theme for two different language?
- Acivate all themes multisite wide automatically
- Question regarding WP multisite feature
- Featured Image meta box not showing up
- Where do files uploaded via Media Manager get stored in MU?
- How to allow users to create their own website within my domain? [closed]
- Different text on different sites in a multisite setup
- How to make a theme unable to be used on a multisite network?
- Sample Theme Options page for Multisite – what to consider
- Translate a theme with a PO file
- Get themes’s images path in WordPress Multisite
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- Converting a theme to a child theme in a network
- HTTP Error when uploading images over specific dimensions
- How to get blog-id of an MU site from functions.php
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- How to make menus, footer, sidebars multi language
- Recall translations made with Poedit
- Why does the theme of secondary site load the primary one in WordPress Multisite? [closed]
- Let user publish posts on community page
- How to hide blog by id wordpress multisite listing
- Can I use WP Multi-site on a sub-domain with a different theme but use all the original site’s posts/pages?
- Mutlisite in wordpress is not working
- background_image support multiple image size?
- How can I demonstrate themes well?
- Theme Options Doesn’t Work On WP Multisite
- Subsite theme mystery man replacement with Buddypress on main site [closed]
- Custom link color or stylesheets
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- WordPress API Menu/Submenu Order
- What WP folder can I use to write files to?
- Form Submitting Error with get_template_part()
- Can’t get staging site to display same way as live site. Completely stumped
- How to call the_excerpt() with tags or the_content() as an excerpt?
- Display a different theme for not logged-in users
- how to test a theme upgrade
- How to manage multiple domain with different languages on each domain with single wordpress installation?
- How to add paging to query
- what’s meaning of it when submit a theme?
- How to Modify a Widgets UL and/or LI Classes
- How to remove menus section from WordPress theme customizer
- Allow users to add custom functions to wordpress theme
- How to add custom template tag in wordpress theme?
- Doubled titles when using All in One SEO with custom template
- What page should I use for a contact form?
- Get attachments by user
- Appending a value to metabox before and after saving
- I made a my own theme to WordPress and Admin Menu missing from frontend
- What program can I use to preview my wordpress site?
- How to remove a file included in parent theme with locate_template() via child theme?
- Can’t override template file in child theme
- Simple way to get two language WP site
- How can i initialize a widgetized sidebar (with widgets)
- How do you force a sidebar widget to have a container div around all child widgets?
- jQuery not available to other scripts
- Does the switch_theme action run when you’re upgrading a theme?
- How to jump to newly posted comment anchor after submit?
- Best way to develop a new theme on a live site, with new content? [closed]
- Can I use WooCommerce in a headless CMS setup?
- Pagination not working on page template
- adding class to excerpt
- How can I wrap all blog posts image with
- Redux Setting on custom created admin page
- Never actually adding the action? Or do I have to call the action?
- How can I remove image taxonomy pages from my theme and from Google?
- How can I get dynamic content on my static home page
- WordPress 6.x / PHP 8.x deprecated warnings in development environment
- WordPress custom menu can’t show 3. level submenu
- Social-Link block not loading html on page with custom theme
- Custom Static Page to Display Blog Posts in Excerpt Non-Singular Form (is_singular not working?)
- Importing sass into underscores theme
- What is difference between add_theme_support and Theme Customization API?
- How do I remove header/page-title image in farvis theme? [closed]
- Which theme PHP file should be edited in order to change Posts appearance
- Get chronological page order
- How to override wordpress native options with theme options
- Problem with multiple menus in theme
- How to create multiple sidebar areas with a forloop and register_sidebars?
- Saving Permalinks Results in 403 MAMP (Windows)
- Which function(s) to build a paged HTML table
- white spaces on the all sides [closed]
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]