Up   Previous Page   Next Page
Mill Stream photo by Donna Cooper

Lingvo Tips

Assume site visitor chooses language via link

(~JUMP|(~PageID~),lingvo=deu|title="Click for German"|Deutsch~)

TWebAction called from page header

<!--- call before any dynamic content is expanded --->
(~waLingvo.execute~)

TWebAction sets reserved session variable

waLingvo defined in lib\dmDream.pas

uses htmConst;

procedure TDataModuleDreamWeaver.waLingvoExecute(Sender: TObject);
var
  x: Int64;
  S: String;
begin
  inherited;
  x := posci('lingvo=',pWebApp.Command);
  if x > 0 then
  begin
    S := Copy(pWebApp.Command,x+7,maxlongint);
    if Length(S) > 3 then
      S := Copy(S,1,3);
    if (Length(S) = 3) and (S[3]=',') then
      S := Copy(S,1,2);
    pWebApp.Literal[cguestlingvo] := S;
  end;
end;