דלג לתוכן דלג לסרגל הצד

תגיות: 

נושא זה מכיל 0 1, יש ל 1קוֹל.

עודכן לאחרונה על ידי ondrejd-2 לפני 12 חודשים.

בסיוע: Paola Mendiburu.

מחבר פוסטים
יולי 30, 2024 ב־7:34 am #16018955

ondrejd-2

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?