SA-MP Forums Archive
[HELP] Multi langauge system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Multi langauge system (/showthread.php?tid=583692)



[HELP] Multi langauge system - Dusan01 - 30.07.2015

Hello guys, im using this multi-language inc: https://sampforum.blast.hk/showthread.php?tid=363537

and i have problem when i save text as TEST_MSG=Text1\nText2 and i put it in dialog like
Код:
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_MSGBOX, "Test", GetLanguageKey(GetPlayerLanguage(playerid), "TEST_MSG"), "Continue", "Cancel");
and in dialog i get text like this: Text1\nText2
so problem is dont wanna to make new line :S


Re: [HELP] Multi langauge system - VanillaRain - 30.07.2015

TEST_MSG=Text1&&Text2 and i put it in dialog like

try with this


Re: [HELP] Multi langauge system - Dusan01 - 30.07.2015

Quote:
Originally Posted by VanillaRain
Посмотреть сообщение
TEST_MSG=Text1&&Text2 and i put it in dialog like

try with this
not working, again show me like: Text1&&Text2


Re: [HELP] Multi langauge system - SpikeSpigel - 30.07.2015

I don't think it's working with dialog. You can modify that.

Код:
SendLanguageMessage(playerid, 0xFFFFFFFF, "WLC_MSG_1");

/* in English.lng file: */
WLC_MSG_1=(wlc-msg1) Welcome to my server player!



Re: [HELP] Multi langauge system - Dusan01 - 30.07.2015

Quote:
Originally Posted by SpikeSpigel
Посмотреть сообщение
I don't think it's working with dialog. You can modify that.

Код:
SendLanguageMessage(playerid, 0xFFFFFFFF, "WLC_MSG_1");

/* in English.lng file: */
WLC_MSG_1=(wlc-msg1) Welcome to my server player!
can u tell me why it should not work with dialog, when this callback will get the text so i can use it anywhere i want...
Код:
GetLanguageKey(GetPlayerLanguage(playerid), "TEST_MSG")



Re: [HELP] Multi langauge system - Dusan01 - 31.07.2015

BUMP!!


Re: [HELP] Multi langauge system - Dusan01 - 01.08.2015

BUMP!!


Re: [HELP] Multi langauge system - CodeStyle175 - 01.08.2015

PHP код:
enum LanguageEnum
{
    
lang[10],
    
type[30],
    
text[120]
};
new 
Language[2][LanguageEnum]={
    {
"ENG","TEST_MSG","testingtestingtesting"},
    {
"GER","TEST_MSG","testingtestingtesting"//and so one
};
LanguageMsg(lang[],type[]){
    new 
string[120]="Something went wrong!";           
    for(new 
ii2=sizeof(Language); i2i++){
        if(!
strcmp(lang,Language[i][lang],true) && !strcmp(type,Language[i][type],true)){
            
format(string,sizeof(string),Language[i][text]);
            break;
        }
    }
    return 
string;




Re: [HELP] Multi langauge system - Dusan01 - 01.08.2015

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
PHP код:
enum LanguageEnum
{
    
lang[10],
    
type[30],
    
text[120]
};
new 
Language[2][LanguageEnum]={
    {
"ENG","TEST_MSG","testingtestingtesting"},
    {
"GER","TEST_MSG","testingtestingtesting"//and so one
};
LanguageMsg(lang[],type[]){
    new 
string[120]="Something went wrong!";           
    for(new 
ii2=sizeof(Language); i2i++){
        if(!
strcmp(lang,Language[i][lang],true) && !strcmp(type,Language[i][type],true)){
            
format(string,sizeof(string),Language[i][test]);
            break;
        }
    }
    return 
string;

That is working, tnx REP+