I would like to get a term, knowing only part of its slug. The way my slugs are set up, make it so the category name appears before a language code, and I sometimes need to get the term just from the category name and language code concatenated together, but if that exact term doesn't exist, I don't get anything from get_term_by.
That would be okay, except, some of my terms are in multiple languages, and when I know the category and the language, say it's apple in french and english, and I need to find that term from just knowing that I am dealing with apple, and I'm in english.
More concrete example:
term name: apple_en_fr
I want to search for apple_en or apple_fr and get that term.
How could one go about getting a fuzzy match, like that?