AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Multilingual problem ("half" English) (https://forums.alliedmods.net/showthread.php?t=251564)

Chill it BanG 11-15-2014 09:04

Multilingual problem ("half" English)
 
I have problem with multilingual system and I cannot find reason and/or solution, so I thought someone of you could help.

As title says "half English" - most of my plugins runs by using "LANG_PLAYER" for chat announcements and everything was fine, till yesterday I updated one of my plugins with some new lines (also ML part)... I added some "client_print_color" and actually that is all i did.
At first I used "register_dictionary_colored", but then I thought, maybe that is the reason, so I removed color "codes" (!t/!g/!n) from ML file and changed back to "register_dictionary"... nothing changed.

Well, since I hate asking for help, I tried good ol` searching, I found one topic https://forums.alliedmods.net/showthread.php?t=129952 the same problem, any solution provided :<

And, this is for ALL plugins that use ML, not only for modified one!

No, I am not getting ML_NOTFOUND error.

Some code from plugin (also some things I tried, like using formatex, and printing msg without colors)
PHP Code:

//new text[128]
new name[32]
get_user_name(idname31)
//formatex(text,127,"%L",LANG_PLAYER,"BOUGHT_SPEED",name, powertime[id][1])
client_print_color(0,RED,"^3[TSHOP]^1 %L",LANG_PLAYER,"BOUGHT_SPEED",namepowertime[id][1])
//client_print(0,print_chat,"[TSHOP] %L",LANG_PLAYER,"BOUGHT_SPEED",name, powertime[id][1]) 

Some lines ML, i know [lv] is not official amxmodx language, but it has been working without any error since this day.

HTML Code:

[en]
BOUGHT_NOCLIP = %s bought noclip for %d seconds
BOUGHT_SILENT = %s bought silent footsteps for %d seconds
BOUGHT_BHOP = %s bought autobhop for %d seconds
BOUGHT_SPEED = %s bought speed for %d seconds
BOUGHT_GRAVITY = %s bought low gravity for %d seconds

[lv]
BOUGHT_NOCLIP = %s nopirka noclip uz %d sekundēm
BOUGHT_SILENT = %s nopirka klusus soļus uz %d sekundēm
BOUGHT_BHOP = %s nopirka autobhop uz %d sekundēm
BOUGHT_SPEED = %s nopirka ātrumu uz %d sekundēm
BOUGHT_GRAVITY = %s nopirka zemu gravitāciju uz %d sekundēm


Arkshine 11-15-2014 09:09

Re: Multilingual problem ("half" English)
 
Make sure you register properly the language file.
Make sure your language file is encoded as UTF-8 without BOM.

Chill it BanG 11-15-2014 09:14

Re: Multilingual problem ("half" English)
 
Quote:

Originally Posted by Arkshine (Post 2224463)
Make sure you register properly the language file.

Like this?
PHP Code:

register_dictionary("pointshop.txt"

Quote:

Originally Posted by Arkshine (Post 2224463)
Make sure your language file is encoded as UTF-8 without BOM.

It is (checked all ML files) :<

Arkshine 11-15-2014 09:30

Re: Multilingual problem ("half" English)
 
You don't show really your actual code/files, so hard to tell you what's wrong, but it's likely you fucked up something.
To get this error, it means either the language file is not parsed, or key has not been found.

Since file exists and key exists (at least what we see from first post), it sounds like you don't test properly or did something like renaming data folder or similar.

Anyway, you can have more informations if you set amx_mldebug to 1, then restart ; it will throw messages in amxx error logs if something is wrong.

Chill it BanG 11-15-2014 09:32

Re: Multilingual problem ("half" English)
 
Thanks, I will try it :)

EDIT:
"amx_mldebug 1" didn`t work, tried "amx_mldebug lv" instead.
Only error was "L 11/15/2014 - 18:36:11: [AMXX] Language key "MSG_FREQ" not found for language "lv", check "scrollmsg.amxx""
Fixed it, everything is still half english and no more error logs from ML :o

EDIT#2:
Well, solved it... I guess problem was with custom_lang_menu.amxx because it had problems to store "setinfo "lang" "code"". Have no idea why, changed it manually in my cfg, now everything seems to be working fine.
Thanks for your help, amx_mldebug was quite useful ;)


All times are GMT -4. The time now is 17:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.