Opened 9 years ago
Last modified 8 years ago
#3976 accepted defect
Setting the locale via scripting does not work
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Interactive Environment | Version: | |
Keywords: | Cc: |
Description
Running test.mos:
setCommandLineOptions("+locale=en_US"); getErrorString(); loadModel(Modelica); getErrorString(); getInheritedClasses(Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape); getErrorString();
on a computer with a Swedish locale gives:
IDA-LIU050+adrpo@ida-liu050 MINGW32 ~/dev/OpenModelica/build/bin $ ./omc.exe test.mos true "" true "" {ModelicaServices.Animation.Shape,Modelica.Utilities.Internal.PartialModelicaServices.Animation.PartialShape} "[c:/bin/cygwin/home/adrpo/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.2/Mechanics/MultiBody/Visualizers.mo:1979:8-1980:83:writable] Error: PartialModelicaServices ▒r partiell, namnuppslagning ▒r inte till▒tet i partiella klasser. "
Running omc +locale=en_US
gives me messages in English.
Change History (3)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 8 years ago
Note:
See TracTickets
for help on using tickets.
I guess you need to call System.gettextInit again. Usually applications do not allow you to change the locale after it has been initialized though.