map_switch_language()

Purpose

Switches to another language

Old name

#define change_language(language)
map_switch_language(language,0)

Syntax

void map_switch_language(language, flags)

Parameters

int language

New language

 

int flags Parameter specifying display attributes

 

The parameter flags currently has no effect, so the value DEFAULT must always be passed.

Description

The map_switch_language() function overrides the language specified in the file USERDATA.SYS, or by log on so that all subsequent maps are taken from the new language set by this function.

The new language is used until the program calls either of the functions trm_set_preferences() or trm_unset_preferences() , or this function is called again or until it is terminated.

This function is intended to allow a program to display maps outside the normal language, where this is required for some reason. One possible use of the function is to create a set of maps for a program suitable for training purposes rather than for an experiernced user. It is not suited to a real change of language, because it does not update language related information such as month names, or the words for yes an no. To change languages properly you need to call the trm_set_preferences() functions to log on as a user using the desired language code. Dummy users can be created specifically for this purpose.

See also

trm_set_preferences(), trm_unset_preferences()