User Tag List

Results 1 to 5 of 5

Thread: Gossip Menu text in multiple languages

  1. #1
    Emulation Addict
    Join Date
    Mar 2016
    Posts
    7
    XP
    699
    Level
    6
    Thanks
    2
    Thanked 1 Time in 1 Post

    Gossip Menu text in multiple languages

    hello, guys i have a little problem i want to make my custom script with Gossip menus in at least 2 languages, i read.

    Code:
    Uses gossip item info from DB
    AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action);
    but i dont know how to do it maybe someone know how and can help me to do this
    i want to translate in 2 languages something like this for example
    Code:
                    AddGossipItemFor(player, 0, "|TInterface\\icons\\Spell_Nature_Regenerate:40:40:-14|t Restaurar Vida y Mana", GOSSIP_SENDER_MAIN, 1);		
    		AddGossipItemFor(player, 0, "|TInterface\\icons\\SPELL_HOLY_BORROWEDTIME:40:40:-14|t Resetar Cooldowns", GOSSIP_SENDER_MAIN, 2);			
    		AddGossipItemFor(player, 0, "|TInterface\\icons\\Achievement_BG_AB_defendflags:40:40:-14|t Quitar Bug de Combate", GOSSIP_SENDER_MAIN, 3);	
    		AddGossipItemFor(player, 0, "|TInterface\\icons\\Achievement_BG_winAB_underXminutes:40:40:-14|t Resetar Instancias", GOSSIP_SENDER_MAIN, 4);
    Last edited by damiansp15; 01-08-2017 at 03:07 AM.
    Achievements:
    Member 3 months registered Level V

  2. #2
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,872
    XP
    13,759
    Level
    35
    Thanks
    95
    Thanked 595 Times in 421 Posts
    If you use the first code / function you posted, then you would use the menu_id and id columns from gossip_menu_option table as gossipMenuID and gossipMenuItemID.
    Then the translations would be added to locales_gossip_menu_option with the same menu_id and id.

    So all your gossip text would be in DB. English text in the normal gossip option table and translations in locales gossip option table.
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

  3. The Following User Says Thank You to Rochet2 For This Useful Post:


  4. #3
    Original Poster
    Emulation Addict
    Join Date
    Mar 2016
    Posts
    7
    XP
    699
    Level
    6
    Thanks
    2
    Thanked 1 Time in 1 Post
    thanks now i got it, but have other doubt. i can translate something like PSendSysMessage("|cffFFFF00bla bla bla"); //
    or SendNotification("|cffFFFF00bla bla bla"); in other languages too or i cant because i have to much scripts
    And I would like to have as many languages as possible> X
    but i cant find nothing to do it >^ and sorry for respond 1 week later >p
    Last edited by damiansp15; 01-08-2017 at 03:10 AM.
    Achievements:
    Member 3 months registered Level V

  5. #4
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,872
    XP
    13,759
    Level
    35
    Thanks
    95
    Thanked 595 Times in 421 Posts
    Im not quite sure what is the best way to translate random strings, but I used to use the DB table trinity_string and in c++ you can get the entry with char const* string = ChatHandler(player->GetSession()).GetTrinityString(LANG_YOUR_DEFINED_ STRING_ID); and usually those definitions are in Languages.h
    I think many methods like sendnotification and others are implemented so that you can just call player->GetSession()->SendNotification(LANG_YOUR_DEFINED_STRING_ID);
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

  6. The Following User Says Thank You to Rochet2 For This Useful Post:


  7. #5
    Original Poster
    Emulation Addict
    Join Date
    Mar 2016
    Posts
    7
    XP
    699
    Level
    6
    Thanks
    2
    Thanked 1 Time in 1 Post
    aw thanks rochet solved :/
    and thanks again you saved me a lot of time!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •