Post Reply 
periodic Element Table - call for translators
01-18-2017, 03:55 PM
Post: #6
RE: periodic Element Table - call for translators
(01-17-2017 12:33 AM)eried Wrote:  Hi, nice program, but I have 2 suggestions:

1) You can use STRINGFROMID to detect the current language

You can also just use the Language variable. (You can even set the language using Language:=<number>.)

Quote:2) Having independent language lists might be much less prone to errors than the big list you are using now.

Also, for example you can use AFiles("filename.ext") to save a whole language file list, instead of mixing all the languages and have them always loaded in ram:

Code:
Save:
AFiles("eng.txt"):="my text";

Load:
var:=AFiles("eng.txt")

Get available file list (to check for available languages dinamically):
listvar:=AFiles();

Great ideas. You can alternately just use file names like lang1.txt, lang2.txt, etc. This way when a user creates an app variable, you can restrict yourself to just the files named lang<number>.txt

Code:
filename:="lang" + STRING(Language,1,0) + ".txt";
langdata:=AFiles(filename);

There is a limitation to using the built-in variable Language, though (namely you are limited to what is supported in the Prime). Your program, however, can support whatever language you wish.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: periodic Element Table - call for translators - Han - 01-18-2017 03:55 PM



User(s) browsing this thread: 1 Guest(s)