Language as variable?


I went through Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja but could not spot any language related variable.

My goal is to read the client’s language. E.g. for the client it is set to German:


What I would like to have is the ISO 639-1 code (2 letter code) of the defined language as a variable, e.g. $client_lang_2. Maybe something like this already exists? If not, I can make a Feature Request on GitHub of course - just let me know.


@david is this supported?

Where do you want to access this? If you wish to access it in the email or invoice templates it of already available as the variable


Yes, in the template.
But $country_2 would be “CH” for Switzerland and not “DE” for German for the language.

We could of course workaround this with another custom client field:

And then read this variable into the template. But doesn’t really make sense, when there’s already an (official) field for language. :wink:

Sorry for bumping this one up again, @david @hillel , but any chance this could make it into an upcoming release?

Having this language variable at hand would be very helpful to create some dynamic template adjustments, e.g. different input from external scripts depending on the selected language. Or dynamic design adjustments for certain languages. awaits your attention :wink: