Udo,
If you put your string literal constants and messages into a JSM file
they will be compiled into your script binary file (JSB). It means, your
users will not be able to translate them freely if they do not have the
fully source code of the script set.
If I write a script and I do not want to publish its source code, I put
my messages and strings into a simple INI like file, which is accessible
freely by my users and they can translate it without affecting my source
code.
I use the folloving naming convension by translatable text in JSM files::
I put screen texts into literal constants like it:
cmnuFileSaveAs = "Save as",
cmnuEditCut = "Cut"
cdlgTitle="Open Fle"
cbtnOk="Ok"
The messages my script use i nme as follows:
@msgOpenFileError
An error occurred opening this file: %1
@@
@msgSayVersion
%1 is the running version.
If I use INI like file, than I organize my translatable texts into
smaller logical groups as follows:
[File menu]
OpenAs=Open as
...
[Edit menu]
CutAs=Cut as
..
[Error messages]
FileOpenError=Opening this file an error occurred. (Error code: %1)
HTH
Chaba
@@v
2020. 09. 11. 17:40 keltezéssel, Udo Egner-Walter írta:
Hi all,__________�
if you want to make scripts for different languages there is the JSH file to
store variables and constants and the JSM file to store the messages. If your
app depends on string that differs in other languages, what's the best place
to store this. For example you want to click a menu item in a menu. If you
find no other way to identify the menu string and have to use a
language-based string. This string differs in other languages. Should one put
this sting in a const in the JSH file or should one put this string in a JSM
file.
If I put the string in a JSM file it could be that translators translate this
const string without knowing the exakt name of the menu item.
If I put the string in a JSH file it could be that translators miss to
translate the const string.
What do you think is best practice here?
I hope it's all clear what i mean.
Thank for suggestions
Udo __________�
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts