Raised This Month: $ Target: $400
 0% 

Multilingual problem ("half" English)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chill it BanG
Junior Member
Join Date: Nov 2013
Location: Latvia
Old 11-15-2014 , 09:04   Multilingual problem ("half" English)
Reply With Quote #1

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
__________________
Author of deathrun_ezyKore / fy_NewWorldOrder and some other maps

Last edited by Chill it BanG; 11-15-2014 at 09:04.
Chill it BanG is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-15-2014 , 09:09   Re: Multilingual problem ("half" English)
Reply With Quote #2

Make sure you register properly the language file.
Make sure your language file is encoded as UTF-8 without BOM.
__________________
Arkshine is offline
Chill it BanG
Junior Member
Join Date: Nov 2013
Location: Latvia
Old 11-15-2014 , 09:14   Re: Multilingual problem ("half" English)
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Make sure you register properly the language file.
Like this?
PHP Code:
register_dictionary("pointshop.txt"
Quote:
Originally Posted by Arkshine View Post
Make sure your language file is encoded as UTF-8 without BOM.
It is (checked all ML files) :<
__________________
Author of deathrun_ezyKore / fy_NewWorldOrder and some other maps
Chill it BanG is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-15-2014 , 09:30   Re: Multilingual problem ("half" English)
Reply With Quote #4

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.
__________________
Arkshine is offline
Chill it BanG
Junior Member
Join Date: Nov 2013
Location: Latvia
Old 11-15-2014 , 09:32   Re: Multilingual problem ("half" English)
Reply With Quote #5

Thanks, I will try it

EDIT:
"amx_mldebug 1" didn`t work, tried "amx_mldebug lv" instead.
Only error was "L 11/15/2014 - 186: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

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 ;)
__________________
Author of deathrun_ezyKore / fy_NewWorldOrder and some other maps

Last edited by Chill it BanG; 11-17-2014 at 06:17.
Chill it BanG is offline
Reply



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 -4. The time now is 17:38.


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