AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Make multilinguage (https://forums.alliedmods.net/showthread.php?t=107318)

vL. 10-25-2009 07:29

Make multilinguage
 
Hy, I didnt quite find a tutorial, what explaines all I need. Here is the line
PHP Code:

show_hudmessage(0,"The time: %d:%d:%d^nTime remaining: %d:%02d^nNext map: %s"time_hourtime_mintime_sectimeleft 60timeleft 60,nextmap

I need it to use "%L" so I can change the languages, because in my language we have ää õõ öö üü but they dont work in the real .sma so I need to use a txt file

Arkshine 10-25-2009 07:37

Re: Make multilinguage
 
Code:
// In plugin_init() register_dictionary( "mydictionaryfile.txt" ); // In your function() show_hudmessage(0,"%L", LANG_PLAYER, "TIME_REMAINING", time_hour, time_min, time_sec, timeleft / 60, timeleft % 60,nextmap ); // In your dictionary file : [en] TIME_REMAINING = The time: %d:%d:%d^nTime remaining: %d:%02d^nNext map: %s

As notes : I use LANG_PLAYER because the id here is 0. If 0 is not passed you have to use this id instead. eg : If you write show_hudmessage(index ; you have to use index instead of LANG_PLAYER.

vL. 10-25-2009 08:41

Re: Make multilinguage
 
Hmm, it is not working :S
Here is the hudmsg.txt
PHP Code:

[et]
TIME_REMAINING Kellaaeg: %d:%d:%d^nAega jäänud: %d:%02d^nJärgmine map: %s

[en]
TIME_REMAINING The time: %d:%d:%d^nTime remaining: %d:%02d^nNext map: %

I want it to use the [et]

Arkshine 10-25-2009 08:53

Re: Make multilinguage
 
What's not working ? The accents ? I forgot to say you have to save the dictionary file as UTF8 without BOM if you want to see the accents in game.

vL. 10-25-2009 09:36

Re: Make multilinguage
 
O.. yess, thank you, its working now, but there are some errors with the type, the hud isn't showing right, its like some letters and numbers are bolder and having some flaws, like it isn't clean.
Also I need some rank system

Arkshine 10-25-2009 09:39

Re: Make multilinguage
 
Not sure what you are talking about. But it displayed weirdely for some characters you can't do nothing about it.

vL. 10-25-2009 10:05

Re: Make multilinguage
 
Okay, but can you help me with the Rank thing?

Arkshine 10-25-2009 10:34

Re: Make multilinguage
 
One problem = One thread. You better create another thread with this problem.

vL. 10-25-2009 11:13

Re: Make multilinguage
 
Okay, uve been very helpfull.

+ karma. :)


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

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