|
Post by neuropsychddx on Oct 28, 2021 9:11:14 GMT -5
I belive that programming should not be limited to English language. Considering the ease of learning LB. I would like to develop a LB program as a rule based translator that translates vernacular keywords to original LB code. Example બટન with a leading and trailing space would get translated to Button. This would be a very crude method but likely to work with trial and error. This can expand the reach of LB to non-english programmers. A unicode based IDE based on notepad++ can then be made, with LB4 as interpretor of the translated code. (Example - helpin.red/Downloads.html a red language IDE using notepad and code highlighting) How can error messages be translated back to vernacular language? However, the idea would depend on whether or not LB4 supports Unicode?
|
|
|
Post by Brandon Parker on Oct 28, 2021 9:40:30 GMT -5
The currently commercially released LB v4.5.1 is ASCII only and does not natively support Unicode, but LB 5, which is in development, supports it better.
{:0)
Brandon Parker
|
|
|
Post by Rod on Oct 28, 2021 10:53:20 GMT -5
I have seen graphical coding interfaces before. Granted they are not text based but an alternative to text is small images of buttons decision points that can be dragged and dropped. Images would overcome the language barrier.
|
|
|
Post by Walt Decker on Oct 28, 2021 12:30:26 GMT -5
One might try using kernel32.dll function MultiByteToWideChar() insuring that the return string is at least 2x the input string. To display the text various API text functions would have to be used, e. g. TextOutW(), DrawTextW().
|
|
|
Post by Carl Gundel on Oct 28, 2021 13:59:51 GMT -5
I belive that programming should not be limited to English language. Considering the ease of learning LB. I would like to develop a LB program as a rule based translator that translates vernacular keywords to original LB code. Example બટન with a leading and trailing space would get translated to Button. This would be a very crude method but likely to work with trial and error. This can expand the reach of LB to non-english programmers. A unicode based IDE based on notepad++ can then be made, with LB4 as interpretor of the translated code. (Example - helpin.red/Downloads.html a red language IDE using notepad and code highlighting) How can error messages be translated back to vernacular language? However, the idea would depend on whether or not LB4 supports Unicode? You plan to create an interface between a foreign language code editor and Liberty BASIC?
|
|
|
Post by neuropsychddx on Nov 11, 2021 10:19:35 GMT -5
Yes, I would be a translator that will translate only the foreign keywords to English.
An example is લીસ્ટબોક્ષ #મુખ્ય.લિસ્ત્બોક્ષ૧, લીસ્ટબોક્ષસૂચી$(), [લીસ્ટબોક્ષક્લીક], ૫, ૫, ૧૮૦, ૩૮૫
would get converted to
listbox #મુખ્ય.લિસ્ત્બોક્ષ1, લીસ્ટબોક્ષસૂચી$(), [લીસ્ટબોક્ષક્લીક], 5,5,180,385
variable names would remain the same number would also be converted
if liberty basic could support Unicode
|
|
|
Post by Carl Gundel on Nov 11, 2021 13:10:13 GMT -5
Yes, I would be a translator that will translate only the foreign keywords to English. An example is લીસ્ટબોક્ષ #મુખ્ય.લિસ્ત્બોક્ષ૧, લીસ્ટબોક્ષસૂચી$(), [લીસ્ટબોક્ષક્લીક], ૫, ૫, ૧૮૦, ૩૮૫ would get converted to listbox #મુખ્ય.લિસ્ત્બોક્ષ1, લીસ્ટબોક્ષસૂચી$(), [લીસ્ટબોક્ષક્લીક], 5,5,180,385 variable names would remain the same number would also be converted if liberty basic could support Unicode LB5 does support unicode but not in the way you are thinking. Only the contents of strings will be unicode. You might be able to write a keyword converter, but you won't be able to do this because the compiler won't support it, and neither will the debugger: listbox #મુખ્ય.લિસ્ત્બોક્ષ1, લીસ્ટબોક્ષસૂચી$(), [લીસ્ટબોક્ષક્લીક], 5,5,180,385 Only aA-zZ (and Arabic digits) will be permitted in handles, array name, branch labels, etc. Sorry. Perhaps you can generate a map between the foreign language names of things and some enumerated names. It won't make the translated code very readable (for example in the debugger), but it will still let you write in a foreign language. For example: listbox #handle1.ext1, array1$(), [branchlabel1], 5,5,180,385
|
|