The Language constant that youre trying to build will work if the final, full constant is defined in your language file. In other words, if you set
$langConstant = 'XYZ', then
TPL_CTM_F_XYZ must exist in the language file that you are using.
All of these will work, (knowing that
JNO are found in a language file)
$variable = 'JYES';
$yes = strtoupper('yes');
$constructed = 'J'.$yes;
You define Language strings in the language folder of your component. These are typically located in
\language\en-GB from the root of your site, or within the components folder (where 'en-GB' is your language). That language file is loaded with your component and the rest is taken care of by Joomla.
See Creating a Language File and Specification of Language Files. If you need a language string from other than your component, see how to do at Loading Extra Language Files.
Additionally, in the Administrator, you can add and maintain language strings using the Language Manager.