h6. [[MessageTrans]] h6(. » [[MessageTrans SWI Calls|SWI Calls]] h6((. » MessageTrans_Lookup h2. MessageTrans_Lookup h5. (SWI &41502) |_<^{width:4em}. Entry | | |<^. R0 |<^. Pointer to 4-word data structure, or 0 for global messages | |<^. R1 |<^. Pointer to [[MessageTrans Token|Token]] | |<^. R2 |<^. Pointer to buffer for result | |<^. R3 |<^. Size of buffer | |<^. R4 |<^. Pointer to parameter 0, or 0 if none | |<^. R5 |<^. Pointer to parameter 1, or 0 if none | |<^. R6 |<^. Pointer to parameter 2, or 0 if none | |<^. R7 |<^. Pointer to parameter 3, or 0 if none | |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Pointer to token-terminator | |<^. R2 |<^. Pointer to result string (read only with no substitution if R2 = 0 on entry) | |<^. R3 |<^. Size of result excluding terminator | h4. Use This SWI is used to translate a message token into a string, with optional parameter substitution. h4. Notes If R2 = 0 on entry, you'll get a pointer to a read-only string, and no parameter substitution will be done, also the string will be terminated by 10, and not 0. If R2 != 0, %0 to %3 in the string will be replaced by the strings in R4 to R7. Prior to this call, you must have called [[MessageTrans_OpenFile]]. If the token is not found in the message file specified, it will be searched for in the global message file. If R2 = 0 on entry and the file is not stored in your own workspace, then the pointer will become invalid after [[Service_MessageFileClosed]] is issued - your application must trap this service call so it can re-read pointers. h4. See also * [[MessageTrans_GSLookup]] * [[MessageTrans_OpenFile]] * [[MessageTrans Token]] * [[Service_MessageFileClosed]]