Justin Payne Posted November 23, 2014 Share Posted November 23, 2014 I'm interested in creating applications that will allow the ability to apply strings of text depending on the local of the computers language. At first, I thought parsing a file full of localized language test would be best but I'm wondering if a resource file wouldn't be a better option. So, my questions are... Is using a resource file a good idea for doing this sort of thing? If 1 is correct, what is a good resource editor, taking into account I generally want to focus on the Falcon but it wouldn't be a bad idea to target the older version of the resource file. Quote Link to comment Share on other sites More sharing options...
ParanoidLittleMan Posted November 23, 2014 Share Posted November 23, 2014 Really I'm not sure what exactly you want. You want to determine language of Atari/TOS ? Then parsing some file "full of localized language text" is not good way for sure. Same stays for resource files. It can not give reliable answer. You better use language flag in TOS header. And/Or allow user to select language. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted November 23, 2014 Author Share Posted November 23, 2014 I'll explain better..I would like an application that would allow a user to choose a specific language. So, if someone chooses French, all text will be in French. A possible feature would be for my app to determine the chosen language and automatically choose that language at start-up. Now, I know how to determine the default language of the system, so that's not the issue. What I'm looking for is determining if how best to store these translated strings. One option is to provide a file, containing strings for each language, a key/value pair. From my memories from C++ programming on windows, this sort of information was stored in a resource file. It appears that the resources files for the ST are similar, but I just wanted to confirm that with someone who is more familiar with creating them. If resources files are a good use for this, what resources editor would be considered one of the best, especially if I wanted to target both versions of the resources files. I understand there was the original version and a later one that would support color icons. Is that more clear? Quote Link to comment Share on other sites More sharing options...
ParanoidLittleMan Posted November 24, 2014 Share Posted November 24, 2014 There is no any multilanguage support in TOS resource files. Textual strings are stored as simple C strings, with 0 terminator. There are several ways how may solve storing and handling of translated strings. RSC files will not help in that. Quote Link to comment Share on other sites More sharing options...
Christos Posted November 24, 2014 Share Posted November 24, 2014 You need multiple resource files, one for French, English, German etc. I've seen some programs that can do what you want, but I don't remember which ones. I think it's possible to have the system load the proper rsc for the choosen language. Quote Link to comment Share on other sites More sharing options...
krupkaj Posted November 24, 2014 Share Posted November 24, 2014 IIRC Resource Master from Ardisoft supports language layers. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted November 24, 2014 Author Share Posted November 24, 2014 Thanks all. I'm glad you could understand the question I was trying to ask spite the small typo. What I meant to saynis that Im interested in writing applications that deal with different language support. Thanks krupkaj. I assume this page contains the app you're referring to. https://freeshell.de/~ragnar76/pearls/ Quote Link to comment Share on other sites More sharing options...
jflemaire Posted November 24, 2014 Share Posted November 24, 2014 Thanks all. I'm glad you could understand the question I was trying to ask spite the small typo. What I meant to saynis that Im interested in writing applications that deal with different language support. Thanks krupkaj. I assume this page contains the app you're referring to. https://freeshell.de/~ragnar76/pearls/ You can get ResourceMaster directly from the author's site: http://www.ardisoft.de/ Any RSC editor will allow you to create multiple resource files, obviously, one for each language, but RSM has a special mode that makes it easier. As far as multi language apps go, you can study GEMDict's http://www.gemdict.org/ C code, but you'll need MiNT and a network connection to make it run. Quote Link to comment Share on other sites More sharing options...
lp060 Posted November 24, 2014 Share Posted November 24, 2014 I would allow the program to poll the language, but definitely provide an option to override that. Sometimes users have a TOS version that is not in their spoken language. If your resource file contains only strings of text, it might be overkill. If that was that case for me I'd just come up with my own simple file format to get the job done. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted November 24, 2014 Author Share Posted November 24, 2014 Yes, I would never force a language. Initially, I'd check the OS language but if they choose a new default language, I'd set that in a file so everytime that program is started up, that chosen language would be used. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.