Template strings translation

You should check how WPML saves the laguage. In Polylang I can call a taxonomy called language with L&L and get the current language. Maybe WPML uses the same approach.

If thats the case, you can set a variable with the value from the taxonomy an use switch (See Julias post) to build the labels. At least with Polylang this works like a charm.

And a check for the path (like you suggested) can be used as fallback for the rare case you load something before the language is defined from WPML. (I had one case with DIVI where this was neccessary)