1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 //===============================
10 //===============================
13 if execstr('gettext()','errcatch')==0 then pause,end
15 // two inputs arguments
16 str1="plop"; str2="plip"; if execstr('gettext(str1, str2)','errcatch')==0 then pause,end
18 // Try to translate from en_US to en_US to a string which doesn't exist
19 lang="en_US"; setlanguage(lang); msg="Localization does not exist"; if gettext(msg) <> msg then pause, end
21 // Try to translate from en_US to fr_FR to a string which doesn't exist
22 lang="fr_FR"; setlanguage(lang); msg="Localization does not exist"; if gettext(msg) <> msg then pause, end
24 lang="fr_FR"; setlanguage(lang); msg="Startup execution:"; if gettext(msg) <> "Initialisation:" then pause, end
26 lang="fr"; setlanguage(lang); msg="Startup execution:"; if gettext(msg) <> "Initialisation:" then pause, end
28 lang="en"; setlanguage(lang); msg="Startup execution:"; if gettext(msg) <> msg then pause, end
30 lang="en_US"; setlanguage(lang); msg="Startup execution:"; if gettext(msg) <> msg then pause, end