| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > PopupClass > PopupClass Methods >====== SetTranslator (set run-time translator:PopupClass) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[settoolbox set menu item toolbox status .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[toolbox start the popup toolbox menu .htm|{{btn_next_n.gif|Next page}}]] | | || **SetTranslator(****// //**//translator //**)** {{blk2blue.jpg|blk2blue.jpg}} | **SetTranslator** | Sets the TranslatorClass object for the PopupClass object. | | //translator// | The label of the TranslatorClass object for this PopupClass object. | The **SetTranslator **method sets the TranslatorClass object for the PopupClass object. By specifying a TranslatorClass object for the PopupClass object, you can automatically translate the popup menu text--the TranslatorClass object does not otherwise translate popup menus because they are not part of the WINDOW structure. **Implementation:** The Ask method uses the TranslatorClass object to translate popup menu text before displaying it. **Example:** **PopupMgr   PopupClass                !declare PopupMgr object** **Translator TranslatorClass           !declare Translator object** __**MenuChoices  EQUATE('&Save Menu|&Restore Menu|&Close')!declare menu definition**__ ** CODE** ** Translator.Init                     !initialize Translator object** ** PopupMgr.Init(INIMgr)               !initialize PopupMgr object** ** PopupMgr.AddMenu(MenuChoices)       !add Popup menu** ** PopupMgr.SetTranslator(Translator)  !enable popup text translation** ** !program code** ** PopupMgr.Ask()                      !display translated menu** **See Also:     **[[ask display the popup menu .htm|Ask]]