Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Methods > SetLang Method
TIdFTP.SetLang Method

Requests greeting and textual responses in the spcified language.

procedure SetLang(
    const ALangTag: String
Language tag for the FTP client. 

SetLang is a procedure used to implement negotiated language support for greeting and error messages on the the FTP server. Use SetLang to indicate which language to present server greetings and the textual part of command responses. 

ALangTag contains one of the language tags defined in RFC 1766. If ALangTag contains an empty string, the sever should use the default language for the server implementation. Greetings and responses issued prior to language negotiation are also in the server's default language. 

The SetLang method affects only presentation of greeting messages and explanatory text associated with command responses. No attempt should be made by the server to translate protocol elements (FTP commands and numeric responses) or data transmitted over the data connection. Commands and numeric responses in the FTP protocol are unaffected by language support on the FTP server. 

SetLang sends the FTP LANG command using the value in ALabgTag as an argument. 

An FTP client may issue the LANG command at any time during an FTP session. In order to gain the full benefit of this command, it should be presented prior to authentication. 

Please note that most FTP servers do not implement support for the FTP LANG command. Use the IsExtSupported or LangsSupported methods to determine if language support appears the Capabilties for the remote FTP server.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.