Background of the issue:
I need to get the language code for taxonomy by its ID. I am writing some custom functions for WP All Export / WP All Import pro to export and import content more quickly. When I export all the taxonomies from the database, I don't have the language codes in the resulting CSV or XLSX, which complicates navigation in the sheet. I need help with a simple function. Example: get_wpml_taxonomy_language( $term_id = '' ){ if ( ! empty ( $term_id ){ return some_code_that_returns_language_code( $term_id ); } else { return; } }
Symptoms:
I don't have the language codes in the resulting CSV or XLSX when exporting taxonomies.
Questions:
How can I get the language code for a taxonomy by its ID?
Is there a function in WPML to return the language code for a taxonomy term?
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.