This page is obsolete. Localization functions have changed. See:
https://help.scilab.org/docs/current/en_US/tbx_build_localization.html
https://help.scilab.org/docs/5.5.2/en_US/section_5dfd42f240debfff7f3ef5d34ef0e11a.html
The old page follows.
Localization (Scilab 5.x) : User's point of view
- getlanguage function :
returns current language used by scilab
-->getlanguage() ans = fr_FR
- setlanguage function :
set a new language for scilab (specifies the language environment)
-->setlanguage('fr') ans = T
-->setlanguage('fr_FR') ans = T
- getlanguagealias function :
returns the language alias of current language (if exists)
-->getlanguagealias() ans = fr
alias languages recognized by scilab
ca |
ca_ES |
cn |
zh_CN |
cs |
cs_CZ |
cy |
cy_GB |
da |
da_DK |
de |
de_DE |
el |
el_GR |
en |
en_US |
es |
es_ES |
et |
et_EE |
eu |
eu_ES |
fa |
fa_IR |
fi |
fi_FI |
fo |
fo_FO |
fr |
fr_FR |
he |
he_IL |
hr |
hr_HR |
hu |
hu_HU |
id |
id_ID |
is |
is_IS |
it |
it_IT |
ja |
ja_JP |
ko |
ko_KR |
lt |
lt_LT |
my |
ms_MY |
nb |
nb_NO |
nl |
nl_NL |
pl |
pl_PL |
pt |
pt_PT |
ro |
ro_RO |
ru |
ru_RU |
sk |
sk_SK |
sl |
sl_SI |
sr |
sr_YU |
sv |
sv_SE |
th |
th_TH |
tl |
tl_PH |
tr |
tr_TR |
tw |
zh_TW |
uk |
uk_UA |
- getlanguagestable function :
returns a table with all languages usuable with scilab (RFC 3066 bis)
-->RFC3066bis=getlanguagestable(); -->RFC3066bis(83,1) ans = en_US -->RFC3066bis(83,2) ans = English (United States) -->
- gettext function
3 domains of strings are possible in scilab : 'errors', 'messages' , 'menus'
- Example : 'messages' domain , to get string associated to the tag 'time_message_1'
-->msg=gettext('messages','time_message_1') msg = dt=getdate(x) x must be > 0.
- Example : 'errors' domain , to get string associated to the tag 'time_error_1'
-->err=gettext('errors','time_error_1') err = Error : year (1800 - 3000).
- Example : 'menus' domain , to get string associated to the tag 'tclsi_menu_1'
-->menu=gettext('menus','tclsci_menu_1') menu = Cancel
- To get all tags and strings associated in a domain
-->[TAGS_MSG,STRINGS_MGS]=gettext('messages'); -->[TAGS_ERR,STRINGS_ERR]=gettext('errors'); -->[TAGS_MNU,STRINGS_MNU]=gettext('menus');
- addtext function
- to add entrie(s) (tag,string) in a domain
-->addtext('messages','my_tag_3','viva el scilab') ans = T -->addtext('messages',['my_tag_1','my_tag_2'],['my message in scilab','hello scilab']) ans = T -->gettext('messages','my_tag_2') ans = hello scilab -->gettext('messages','my_tag_1') ans = my message in scilab
- removetext function
to remove a entry (tag,string) in a domain
- Example : to remove tag 'my_tag_2' in domain 'messages'
-->removetext('messages','my_tag_2') ans = T -->gettext('messages','my_tag_2') ans = []