Inserting terms as multilingual strings
-
Hello,
Categories for my site are generated dynamically by users.
Therefore, when submitting a post, 1) I check if the category exists, 2) If not, I enter it with
wp_insert_term()
.For the case where I insert the term, I would also like to insert its translation (I have a way of getting the translation of the user’s term).
Is it safe to simply use
WPGlobus_Utils::build_multilingual_string()
for the$name
field ofwp_insert_term()
(ie:wp_insert_term(WPGlobus_Utils::build_multilingual_string( $some_array ), $taxonomy );
)?Is this the way to programmatically insert a term with its translations?
Thank you
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Inserting terms as multilingual strings’ is closed to new replies.