| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIIViewerClass > AsciiViewerClass Methods >====== SetTranslator (set run-time translator:ASCIIViewerClass) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[setlinerelative move n lines .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[takeevent process accept loop event asciiviewerclass .htm|{{btn_next_n.gif|Next page}}]] | | || **SetTranslator(****// //**//translator //**)** {{blk2blue.jpg|blk2blue.jpg}} | **SetTranslator** | Sets the TranslatorClass object for the AsciiViewerClass object. | | //Translator// | The label of the TranslatorClass object for this AsciiViewerClass object. | The **SetTranslator **method sets the TranslatorClass object for the AsciiViewerClass object. By specifying a TranslatorClass object for the AsciiViewerClass object, you automatically translate any window or popup menu text displayed by the viewer. **Implementation:** The SetTranslator method sets the TranslatorClass object for the PopupClass, AsciiPrintClass, and AsciiSearchClass objects. **Example:** **Viewer    AsciiViewerClass             !declare Viewer object** **Translator  TranslatorClass            !declare Translator object** ** CODE** **  Translator.Init                    !initialize Translator object** ** ViewerActive=Viewer.Init( AsciiFile,|     ! file label,** **              A1:line,               |     ! file field to display** **              Filename,              |     ! variable file NAME attribute** **              ?AsciiBox,             |     ! LIST control number** **              GlobalErrors,          |     ! ErrorClass object** **              EnableSearch+EnablePrint)    ! features to implement flag** ** IF ~ViewerActive THEN RETURN.             !if init unsuccessful, don't** ** ! call other Viewer methods** ** Viewer.SetTranslator(Translator)           !enable text translation** ** !program code**