I know I will rewrite those two SQL queries to one query; this is a proof of concept which can get refactored until the program goes to generation.
If I didn ’ t specify the edition of the slug, the problem with this is, it will fail. If You Wish to Be Sure a word is defined, this can be fine but I’d instead have the application continue working so that I battled those tables also came up with the following theory:
I pass across the term that is pure , instead of a slug. The PHP function is as follows:
If the translation didn’t exist, I could fall back to looking this up in speech ‘1’ (English) and return that.
Operate l10n($term, $language_id)
I’m working on a web program which has to support several languages (lucky for me personally, the customer asked English & Spanish but I want to be prepared to easily add another in the future).
So I added a couple more I had my languages table: