View Single Post
  #5  
Old 10-01-2011, 05:55 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by FG28_Kodiak View Post
for your localized messages you can use
sendChatMessageTo(-1, GetLocalizedMessage("ru", "hello"), null);
Does "ru" here mean that the message will be sent only to owners of a RU version?

But what to do if I want to send same message to everyone but in 2 languages? Will this do?
Code:
sendChatMessageTo(-1, GetLocalizedMessage( , "hello"), null);

private string GetLocalizedMessage(string lang, string key)
{
   switch(key)
   {
      case "hello":
      {
         if lang = "ru"
         {
            return "Привет!";
         }
	     else 	
         {
            return "Hello!";
         }
      } break;
   }
   return String.Empty;
}
Isn't "hello" a key that corresponds to both "Привет!" and "Hello!" ?
Reply With Quote