Multilingual - %L without id (nvm solved =) )
I'm using the first time ML and I've come accros a confusing thing, why is id really required ?
How can I skip it if I want to send to all players and I don't have a player id ? EDIT: eh nvm I found it, it's LANG_PLAYER for all players... just my luck, I've been searchin for a couple of minutes and I finally find it unwillingly after I've posted the message... XD Still, to not waste the space, is there any concrete full tutorial on multilingual ? I didn't see any on the forum, wiki or funcwiki. |
Re: Multilingual - %L without id (nvm solved =) )
So far I remember, there is not really a tutorial about ML.
The player's index is needed to retrieve the player's language, through "lang" key. When sending to one player, you need to pass the current player's index to know his language. When sending to all players, You need to pass LANG_PLAYER to tell code to use player's index of all players. If you specify an index instead, the language of this player will be used for all. That's why you need to pass LANG_PLAYER. |
Re: Multilingual - %L without id (nvm solved =) )
You can also use LANG_SERVER for the server's language.
|
Re: Multilingual - %L without id (nvm solved =) )
Hmm, I just used LANG_PLAYER for all of them but it seems that I have different languages, some are server languages and some are player languages... I started replacing them with id where I had an id and I came accros something.
If I format a string that uses ML then send it using a loop to each player... should I use LANG_PLAYER or should I move the format inside the loop ? |
Re: Multilingual - %L without id (nvm solved =) )
Use "id" when you use "id" as the first argument. Use LANG_PLAYER when you use 0 as the first argument.
|
Re: Multilingual - %L without id (nvm solved =) )
Soo... I need to move the format function inside the loop where I use id ?
I can't test this so sorry for bugging you xD |
Re: Multilingual - %L without id (nvm solved =) )
Quote:
I'm guessing the answer is yes. If it's client_print() you can print to 0 and use LANG_PLAYER. |
| All times are GMT -4. The time now is 20:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.