Page 1 of 1

Language Change

PostPosted: Mon Dec 28, 2009 5:27 pm
by Skywalker
Is it possable to change the publications language while it's executed and running using a variable?

Thanks in advance.

tmLocalize PlugIn

PostPosted: Tue Dec 29, 2009 5:19 am
by naglieri

PostPosted: Tue Dec 29, 2009 5:39 am
by Skywalker
Thanks for the reply and info. I was really trying to stay away from plugins. Prefer to use Neobook without them. But if all comes to worse I will give it a try.

Thanks again for posting it.

:D

PostPosted: Tue Dec 29, 2009 12:03 pm
by Neosoft Support
You could do a run-time translation using only NeoBook variables. Just use variables for all of your object captions. You can then change languages by setting those variables. For example:

If "[Language]" "=" "English"
SetVar "[OpenBtn]" "Open"
Setvar "[CloseBtn]" "Close"
EndIf

If "[Language]" "=" "Spanish"
SetVar "[OpenBtn]" "√Ābrase"
Setvar "[CloseBtn]" "Cerca"
EndIf

PostPosted: Tue Jan 05, 2010 8:36 am
by Leos
...or you can do it using a ini.var text file, where you have your own diccionary... like

ini_en.var
ini_es.var
ini_pt.var

inside of each file you have something like this
---------------------------------------
ini_en.var
....................
open=open
close=close

ini_pt.var
...................
open=abrir
close=fechar
---------------------------------------

at the begin of your pub you can do something like this:

If "[language]" "=" "pt"
LoadVariables "ini_pt.var"
endif


I use this method with success.

PostPosted: Tue Jan 05, 2010 11:31 am
by Neosoft Support
Excellent suggestion!

PostPosted: Tue Jan 05, 2010 12:32 pm
by David de Argentina
Following this topic Is possible add the feature?

SaveVariables "ALL|Like Mask" "File"

This will be usefull for save selected variables only, for example:

SaveVariables "ae_*" "Myvars.txt"

Thanks in advance,
David de Argentina

PostPosted: Wed Jan 06, 2010 8:48 am
by Luiz Alfredo
Excelent suggestion David.

PostPosted: Wed Jan 06, 2010 11:14 am
by Neosoft Support
Yes, good idea. I will add it to the list.

PostPosted: Wed Jan 06, 2010 6:37 pm
by Skywalker
Excellent!

I think this will work nicely!

What one overlooks another sees!