PlayerLanguage(playerid, languageid);
#include <a_samp> // without this, all of your script will never work...
#include <multilang> // without this, you will never finished this tutorial...
#define EN 0
#define ID 1 // you can add more language if you can translate it....
#define DIALOG_LANGUAGE 1000 // define the language selection dialog
ShowPlayerDialog(playerid, DIALOG_LANGUAGE, DIALOG_STYLE_MSGBOX, "Language", "Please choose your language \n\nMohon pilih bahasa anda", "English", "Indonesian"); // it's only the example... you can change the message by yourself
switch(dialogid)
{
case DIALOG_LANGUAGE:
{
if(response) // if player choose the "English" button
{
PlayerLanguage(playerid, EN); // Set the player's language into EN (language id 0)
}
if(!response) // if player choose the "Indonesian" button
{
PlayerLanguage(playerid, ID); // Set the player's language into ID (language id 1)
}
}
}
if(dialogid == DIALOG_LANGUAGE)
{
if(response) // if player choose the "English" button
{
PlayerLanguage(playerid, EN); // Set the player's language into EN (language id 0)
}
if(!response) // if player choose the "Indonesian" button
{
PlayerLanguage(playerid, ID); // Set the player's language into ID (language id 1)
}
}
SendClientMessageLang(playerid, language id, color, message);
SendClientMessageLang(playerid, EN, 0xFFFFFFFF, "This is the english message"); // Send the message into player if player's language is setted EN. It will not send if player's language is ID
SendClientMessageLang(playerid, ID, 0xFFFFFFFF, "This is the indonesian message"); // Send the message into player if player's language is setted ID. It will not send if player's language is EN
SendClientMessageToAllLang(color, language id, message);
SendClientMessageToAllLang(0xFFFFFFFF, EN, "This is the English message"); // Send the message to all player with EN language
SendClientMessageToAllLang(0xFFFFFFFF, ID, "This is the Indonesian message"); // Send the message to all player with ID language
ShowPlayerDialogLang(playerid, language id, dialog id, dialog style, caption, message, button 1, button 2);
#define YOUR_DIALOG 100
ShowPlayerDialogLang(playerid, EN, YOUR_DIALOG, DIALOG_STYLE_MSGBOX, "Dialog", "English dialog", "Button1", "Button2"); // Show the English dialog into player with language id EN
ShowPlayerDialogLang(playerid, ID, YOUR_DIALOG, DIALOG_STYLE_MSGBOX, "Dialog", "Indonesian dialog", "Button1", "Button2"); // Show the Indonesian dialog into player with language id ID
GameTextForPlayerLang(playerid, language id, message, duration, style);
GameTextForPlayerLang(playerid, EN, "Message in English", 10000, 2); // Show a game text to palyer with EN language for 10 second. It will not showed if player's language is not EN
GameTextForPlayerLang(playerid, ID, "Message in Indonesian", 10000, 2); // Show a game text to palyer with ID language for 10 second. It will not showed if player's language is not ID
GameTextForAllLang(language id, message, duration, style);
GameTextForAllLang(EN, "English message", 10000, 2); // Show a gametext to all player with EN language for 10 second. It will not showed if player's language is not EN
GameTextForAllLang(ID, "Indonesian Message", 10000, 2); // Show a gametext to all player with ID language for 10 second. It will not showed if player's language is not ID
and if i want for example leangua english | italian if i selelect english i want too see for exmaple all announce in english and if i type italian all in italian how i can do this ?
|
and if i want for example leangua english | italian if i selelect english i want too see for exmaple all announce in english and if i type italian all in italian how i can do this ?
|
You really need to explain more what you are doing in your codes. Otherwise it isn't a tutorial. A tut shows you a tutorial of something, and a tutorial explains. Well, The only positive thing I see here is that there are barely, or not even any tuts that talks about this...
|
It is not translating the text rather it is simply using a function to send a message in other language ( We have to translate the text our self ) .
|