Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 10-01-2011, 06:22 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

No your GetLocalizedMessage does nothing else then "translate" the hello in the language you specify.

There is a way to send a message to a player in his language.
The Player object contends a method called LanguageName()

so for remoteplayer you can use:
Code:
foreach (Player pl in GamePlay.gpRemotePlayers())
        {
           if  (pl.LanguageName().Equals("de"))
           {
               GamePlay.gpHUDLogCenter(new Player[]{pl}, "Hallo", null);
           }
           else if (pl.LanguageName().Equals("ru"))
           {
               GamePlay.gpHUDLogCenter(new Player[] { pl }, "Привет!", null);
           }
           else GamePlay.gpHUDLogCenter(new Player[] { pl }, "Hello", null);
        }
Will integrate this in my script tomoro, now its time to relax


@all
can you please test your language Version with:

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;

public class Mission : AMission
{
    public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceEnter(player, actor, placeIndex);
        
        GamePlay.gpLogServer(null, "\n\nYour language: {0}\n\n", new object[] { player.LanguageName() });
    }
}
german is "de" (tested myself)
english is "en" (not tested)
russian is "ru" (not tested)
so can anyone with this language version check this for me?

But i think the best is to add a option to
private void sendChatMessageTo(int army, string playerlanguage, string msg, object[] parms)
so it will be possible to use
sendChatMessageTo(1, "en", "Hello", null);
so it will send it only to the red players with english language version.

Tomorow

Last edited by FG28_Kodiak; 10-01-2011 at 06:44 PM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.