I have a collection of documents that share a common style file that has all the functions and templating shared by this particular collection. The majority of these are all in the same language, but o handful of them are actually translations of the others. I would like to keep using the same style include file, but a few tidbits (for example in the footer and title sheet) need to be adjusted per-language.
I'm using polyglossia1, and each document has its own language declaration using \setmainlanguage{}
(in my case, mostly to Turkish). Is there some way to retrieve what language has been set and conditional output different strings based on which language is the document default?
1 Actually for some reason my style file also has \usepackage[turkish]{babel}
, which seems to be should be redundant and potentially a conflict with polyglossia; maybe I should sort out why that got in there while I'm messing with this!
babel
andpolyglossia
have\languagename
which holds the currently active language name. And thetranslations
package offers\ifcurrentbaselanguage{<lang>}{<true>}{<false>}
for tests – cgnieder Mar 15 '15 at 11:04