You could store the language in a custom dimension, i.e. a field for categorical data that you can define yourself.
In your GA account go to the property settings, custom definitions, custom dimension. Add a new dimension. Give it a name, which will be used in the reporting interface (in the code custom dimensions will be referred to by their order of creation via a numeric index).
Select a "scope". Choose either hit scope (i.e. the value will be stored for every pageview/interaction separately) or session scope (only the last selected value will be stored and applied to the whole of the session).
Then you need to modify your tracking code to set the custom dimension in the code:
ga('create', 'UA-483951-1', 'auto');
ga('set', 'dimension1', <?php echo $lang; ?> );
ga('send', 'pageview');
The "dimension" keyword indicates that your are setting a custom dimension, the index 1 refers to the first dimension you have created. The "set" call will set the field value for every interaction that follows the set call.
The custom dimension is now ready; it will not show up in the standard reports, you need to select is a secondary dimension, use it in a custom report or build segments based on the recorded value.