Skip to content

Languages

gtbu edited this page Oct 1, 2026 · 6 revisions

Typesetter5 has language files in the language folder.

a language file contains an array with content like

$langmessage = array (
	'LOGGED_OUT'                      => 'You have been logged out.',
	'configuration'                   => 'Configuration',
	'Current Configuration'           => 'Current Configuration',
	'Appearance'                      => 'Appearance',
	'Content'                         => 'Content',
	'Settings'                        => 'Settings',
        .....
        'Customizer'                      => 'Customizer',
        );

In the code You can write :

msg($langmessage['OOPS'].' (Invalid Gadget)');    ---> OOPS will be translated into the language which You had chosen as 
standard for the CMS. In the case of english (en) : 'Oops, that didn\'t work, please try again.'.

or

echo $langmessage['confirm_uninstall'];

or (also in plugins) :

\gp\tool\Output::$inline_vars['colorbox_lang'] = [
				'previous'	=> $langmessage['Previous'],
				'next'		=> $langmessage['Next'],
				'close'		=> $langmessage['Close'],
				'caption'	=> $langmessage['caption'],
				'current'	=> sprintf($langmessage['Image_of'],'{current}','{total}')
			];

Clone this wiki locally