Raised This Month: $12 Target: $400
 3% 

How to translate menu item


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
klin34970
Member
Join Date: Feb 2014
Old 02-24-2014 , 04:06   How to translate menu item
Reply With Quote #1

Hi,
i tried to translate some plugin who use menu

PHP Code:
        if(GetConVarInt(CatWeapons) == 1
        { 
            
Format(weaponssizeof(weapons), "%t""Weapons"); 
            
AddMenuItem(menu"g_WeaponsMenu"weapons); 
        } 
Sometimes I have the good translation(fr) and sometimes I have language server (en).
I saw that :

It is possible to dynamically translate menus to each player through the MenuAction_DisplayItem callback. A special native, RedrawMenuItem, is used to transform the text while inside the callback. Let's redo the vote example from earlier to be translated.

But it's not clear cause I checked adminmenu.sp and it not using that.
klin34970 is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 02-25-2014 , 04:53   Re: How to translate menu item
Reply With Quote #2

Try this
PHP Code:
Format(weaponssizeof(weapons), "%T""Weapons"client); 
This is explained in the wiki here.
__________________
Impact123 is offline
klin34970
Member
Join Date: Feb 2014
Old 02-25-2014 , 05:32   Re: How to translate menu item
Reply With Quote #3

Quote:
Originally Posted by Impact123 View Post
Try this
PHP Code:
Format(weaponssizeof(weapons), "%T""Weapons"client); 
This is explained in the wiki here.
Thank you !
I tried with %T but I missed client and I don't know why because I get use with translation Print.
klin34970 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 02:39.


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