[HELP] Multi langauge system
#1

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
Reply
#2

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

try with this
Reply
#3

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
Reply
#4

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!
Reply
#5

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")
Reply
#6

BUMP!!
Reply
#7

BUMP!!
Reply
#8

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;

Reply
#9

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+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)