Thread: Multilingual Text Engine

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    6

    Multilingual Text Engine

    I would like to develop a Multilingual Text engine, any help and guidence would really be appreciated, I am new to programming and thought that it would be a good idea to have a project to learn how to program.

    Thanks

    Northstar7t

  2. #2
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Do you mean a multilingual text EDITOR?

    If so, I would start with something more simple than that if you are new to programming. A text editor is not as trivial as it may seem, and C is probably a very bad choice of language to write it in.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  3. #3
    Registered User Swarvy's Avatar
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    195
    That has the potential to be quite a complicated project because you would have to respect the grammatical differences between the languages among other things. Even if you kept to only Latin based languages (languages which use a,b,c etc), then you would have difficulties you would have to overcome.

    E.g. In English you would say "I have", but in French it becomes "J'ai", which you could just get via straight translation and then replace the end vowel with an apostrophe and then connect the words but that is an almost trivial example. What happens if you have to deal with completely different grammatical structures? Straight replacement operations from a dictionary won't cut it.

  4. #4
    Registered User
    Join Date
    Aug 2010
    Posts
    6
    Yes you can say in a way a text editor, but not dependent on Microsoft Rich Text, it has to have its own routines to accept, display, and print what the use has typed from the keyboard.

  5. #5
    Registered User
    Join Date
    Aug 2010
    Posts
    6
    Thanks Swarvy, for your input, it should be able to deal with not just latin based, bubt also Middle eastern, and Asian Languages.

    Yes it can get complicated, that is why I am seeking help and guidence.

    If not C then which language is appropriate for this project?

  6. #6
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    If you are new to C I don't recommend starting with something like this. You will only get frustrated over nothing working right and drop learning the language altogether. Try starting up with simpler exercises such as the ones in the tutorials of cprogramming.com or online. There are plenty of books and resources for beginners to start learning the language.

    Generally this idea that you can jump into a new activity and do something complex in the first half an hour doesn't work with anything. When you learn to drive you don't start by taking a Ferrari for a ride. Same idea applies to programming. You take the time to learn and grow, it's a process.

    If you do encounter problems along the way then you can always come back here and ask, that's what the forum is for.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  7. #7
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Northstar7t View Post
    Thanks Swarvy, for your input, it should be able to deal with not just latin based, bubt also Middle eastern, and Asian Languages.

    Yes it can get complicated, that is why I am seeking help and guidence.

    If not C then which language is appropriate for this project?
    The reason why C is not appropriate is that C has very quirky and error-prone string manipulation techniques, which you will probably be using plenty of in such an app. A higher level language like C++ or Java might make it easier for you to do that specific task.

    However remember, all of these programming languages take a considerable amount of time to learn properly, especially if you have no prior experience in programming in any language, so don't expect to jump in and start working on this as your first programming experience.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  8. #8
    Registered User
    Join Date
    Aug 2010
    Posts
    6
    Claudiu, Thanks for your comments, I am new to C, but, I know Fortan, and Basic, and did programming in Dbase, Foxbase also, being an old school electrical engineer I think I might be able to handle a project like this, ofcourse with the help and guidence that I am seeking on this forum. During my days at the university I always felt that a challenge is the best way to learn especially a programming language, because you have that eagarness to find a solution to the problem at hand regrdless of time consideration.

    Look forward to comments and critisium.

    Thanks

  9. #9
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Northstar7t View Post
    Claudiu, Thanks for your comments, I am new to C, but, I know Fortan, and Basic, and did programming in Dbase, Foxbase also, being an old school electrical engineer I think I might be able to handle a project like this, ofcourse with the help and guidence that I am seeking on this forum. During my days at the university I always felt that a challenge is the best way to learn especially a programming language, because you have that eagarness to find a solution to the problem at hand regrdless of time consideration.

    Look forward to comments and critisium.

    Thanks
    Oh ok. From what you originally wrote I somehow got the feeling that you were completely new to programming. But if you do have some experience in other languages, then by all means you can start working on this. However, I still recommend against using C simply because the string manipulation in C is very old and quirky and you need some language that gives you the benefits of using string types without getting lost into all these low level details. I think C++ would be well suited for what you are trying to do.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  10. #10
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Also, I recommend using a throw-away prototype approach to this project, meaning that first you should start with something very simple that accomplished a bit of what you are trying to do. Then build on that to do slightly more. Then even more... etc.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  11. #11
    Registered User
    Join Date
    Aug 2010
    Posts
    6
    Caludiu, Thanks for the input,

    I think you are wright, C++ might just be the right language to experiment with, any suggestions on getting started with writing code for a Multilanguage editor with emphesis on non Latin Languages.

  12. #12
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    If you are not familiar with the Object Oriented paradigm I think you should read a little bit on that to help you get started.

    If you are, then try to break down the functionality of the system into modules and specify what each of them should do. Then, identify places where you can reuse code from other modules. This will help you identify the classes you need to write in C++ and how the objects you instantiate from these classes will help achieve the goals of your system. As I said before, try to start with something minimal and expand on that.

    Also, I think it would be beneficial if the moderators would move this thread to the C++ part of this forum. You can potentially get a lot more feedback and suggestions there than here, on the good ol' C forum.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  13. #13
    Registered User
    Join Date
    Aug 2010
    Posts
    6
    Thanks for your suggestions, will lookup on OOP, You are right the moderators should move this to C++, and I hope it will bring some more suggestion from kind people like you to help me move in the right direction.


    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RichEditCtrl & unicode formatted text
    By ddonate in forum Windows Programming
    Replies: 0
    Last Post: 03-26-2010, 10:50 AM
  2. Need Help in Compiling errors
    By sick in forum C Programming
    Replies: 2
    Last Post: 01-21-2010, 03:26 AM
  3. Detecting Edit Control Text
    By yoonkwun in forum Windows Programming
    Replies: 2
    Last Post: 07-12-2009, 08:48 AM
  4. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  5. Replies: 1
    Last Post: 07-13-2002, 05:45 PM