• 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
teaching a game to "speak" different languages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

teaching a game to "speak" different languages


  • Subject: teaching a game to "speak" different languages
  • From: "tobias ford..." <email@hidden>
  • Date: Thu, 1 Aug 2002 00:07:07 -0500

First, I'm not a localization expert, so I might have some of the terminology incorrect. Second, I searched the archives and googled apples site, but didn't see anything that jumped out at me (I'm also not sure what I'm even looking for).

I'm needing to grab the actual unicode values generated from a user in our game. For example, if a user is chatting in Korean, then everything that avatar says needs to appear in Korean over their head. We've already got it so that the Mac can "listen" to other languages from windows, but I'm having problems getting the Mac to "speak" back. I was under the impression that something very similar to the below would work:

- (void)keyDown:(NSEvent *)theEvent
{
int numberOfKeys = [[theEvent characters] length];
int index = 0;
for (index = 0; index < numberOfKeys; ++index) {
unichar character = [[theEvent characters] characterAtIndex:index];
NSLog (@"%d\n", character);
}
}

The above doesn't work using the "IME" language menu, or even when using an arabic character set from the keyboard. The first generates nothing. This makes me believe that I need to be looking at some other event. The second though, seems odd because the characters are actually generated from the keyboard, but all that I'm seeing are ASCII values.

Can someone either share the secret or point me to the correct documents to take a look at? Thanks, I really appreciate it bc we're on a very tight deadline right now.

Please cc as I'm on digest. Thanks again.

-------------------
Tobias Ford...
email@hidden email@hidden
-------------------
Senior Software Engineer @ WolfPack Studios
www.wolfpackstudios.com www.shadowbane.com
_______________________________________________
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.

  • Prev by Date: Better way to replace a character in a string?
  • Next by Date: Re: Private NIBs?
  • Previous by thread: Re: Better way to replace a character in a string?
  • Next by thread: Re: teaching a game to "speak" different languages
  • Index(es):
    • Date
    • Thread