You can run your string through CBs language API to translate it or use the language format function to send a string through translations. For language format function you'll need to enable format functions under the Parameters tab and can also find example of that format function there. As for API usage the below example should work.
Code:
$variables['var2'] = \CBLib\Language\CBTxt::T( 'My title here!' );
You can also just use a language key like the following.
Code:
$variables['var2'] = \CBLib\Language\CBTxt::T( 'LANGUAGE_KEY_HERE' );
You can use both to allow for English fallback. Example as follows.
Code:
$variables['var2'] = \CBLib\Language\CBTxt::T( 'LANGUAGE_KEY_HERE', 'My title here!' );
You can use built in language overrides to translate all 3 usages.