• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Internationalized text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Internationalized text


  • Subject: Re: Internationalized text
  • From: Clark Cox <email@hidden>
  • Date: Mon, 29 Sep 2003 11:39:54 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Monday, Sep 29, 2003, at 10:47 US/Eastern, Darrin Cardani wrote:

I am writing an application that will be used to produce text in multiple languages. It's a translation tool of sorts, so documents will likely have text in many different languages within them. Some of the text the user enters may end up in menus in the interface, too. For example, they may view their document in it's original English text. Then they can choose another language that they've translated it into, and view it in that language.

So I'm left with a couple of questions.

1) What is the best (cross-platform) way to store the data on disk? What information do I need to make sure that when the document is opened on another computer, it is still legible?

Store it in Unicode.


2) What is the best way to put multi-lingual data into interface elements? For example, if the user has English and Greek versions of their document, I would want my popup menu to have the word "English" (in Roman letters), and the word "Ellinika" in Greek letters in the menu, probably. Can that be done? I was planning on allowing the user to enter the name of the languages they will be translating to and from, so the popup menu could theoretically have words in dozens of languages and scripts in it.

Yes that can be done, and because Cocoa uses Unicode it's rather trivial. There is no need to differentiate between languages and scripts. The popup menu can contain items in wildly different languages, you can even mix them in a single item. The same goes for the rest of the UI elements.

3) What internal data types (again, cross-platform preferred) should be used for keeping around the data the user enters?

Again, use Unicode


I'm a little new to doing this sort of thing. I've dealt with multi-byte text in the Classic toolbox a little bit, using functions like CharacterByteType (), etc., but it seems like things have progressed quite a bit since those days. Any help would be > appreciated.

Yes, things have advanced. If you use NSString, CFString, or any decent 3rd party Unicode string library, most of these issues simply go away.


- -- Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iEYEARECAAYFAj94Uk8ACgkQZ+zIIbXiIoM5lQCeLBGFTIa/mhvw3WmEVda2qaP2
ibMAnjSvD9kzpruXGwkd+Rv4hUuNDfBy
=bqQA
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Internationalized text (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Re: opening of an external program
  • Next by Date: Re: Internationalized text
  • Previous by thread: Internationalized text
  • Next by thread: Re: Internationalized text
  • Index(es):
    • Date
    • Thread