Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - English


setlanguage

chooses the language used for standard messages and help pages for the current session

Syntax

TF = setlanguage(language)

Arguments

language

single string among 'en', 'fr', 'ja', 'pt', 'ru', 'de', en_US', 'fr_FR', 'ja_JP', 'pt_BR', 'ru_RU', 'de_DE', 'zh_TW'...

TF

single boolean: %T if the setting has been actually performed, %F otherwise.

Description

setlanguage(language) changes the language used for error or warning messages or other standard words and texts such as the name of days and months, etc. If their translation is available, help pages are also displayed in the chosen language, after restarting the help browser.

The chosen language applies only to the current Scilab session.

setlanguage('') resets the language to the system value "en_US" and returns %F.

setlanguage works on all supported operating systems.

The new language is not taken into account in the menus of interfaces (help browser, variables browser, code editor, etc). No menus translation is done neither "on-the-flight" nor after reopening the interfaces. To set the language used in the menus, please use setdefaultlanguage(..) instead.

Examples

L = getlanguage();

// Translated strings
setlanguage ja;
_ Monday
setlanguage pt_BR;
_ Monday
setlanguage ru;
_ July

// Error messages:
setlanguage en;
linspace("") // to yield and display an error message
setlanguage ja;
linspace("")
setlanguage ru;
linspace("")

help linspace // the page should appear in Russian (if the help browser was closed)

// Restoring the initial language
setlanguage(L)

See also

  • setdefaultlanguage — sets the language of the session at startup and for some fixed Scilab menus
  • getlanguage — returns the current language used by Scilab.
  • gettext — indexes or/and translates some indexed english messages
Report an issue
<< setdefaultlanguage Multilinguism API Scilab >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:49:22 CEST 2024