<?xml version="1.0" encoding="utf-8"?>
<fpdoc-descriptions>
<package name="lazutils">
<!--
  ====================================================================
    Translations
  ====================================================================
-->
<module name="Translations">
<short>
Contains classes and routines used to load/check/maintain translations from .po (portable object) files.
</short>
<descr>
<p>
  <file>translations.pas</file> contains classes and routines used to load/check/maintain translations from .po (portable object) files.
</p>
<p>
  This file is part of the <file>LazUtils</file> package.
</p>
<p>
  Initial authors: Mattias Gaertner, Bart Broersma, Giuliano Colla
</p>
<p>
  <b>Example 1</b>: Load a specific .po file
</p>
<code>
  procedure TForm1.FormCreate(Sender: TObject);
  var
    PODirectory: String;
  begin
    PODirectory := '/path/to/lazarus/lcl/languages/';
    TranslateUnitResourceStrings('LCLStrConsts',
      PODirectory+'lcl.%s.po', 'nl', '');
    MessageDlg('Title', 'Text', mtInformation, [mbOk, mbCancel, mbYes], 0);
  end;
</code>
  <p>
    <b>Example 2</b>: Load the current language file using the GetLanguageIDs function of the gettext unit in the project lpr file:
  </p>
<code>
    uses
      ...
      Translations, LCLProc;

    procedure TranslateLCL;
    var
      PODirectory, Lang, FallbackLang: String;
    begin
      PODirectory := '/path/to/lazarus/lcl/languages/';
      Lang := '';
      FallbackLang:='';
      LCLGetLanguageIDs(Lang, FallbackLang); // in unit LCLProc
      Translations.TranslateUnitResourceStrings('LCLStrConsts',
        PODirectory+'lclstrconsts.%s.po', Lang, FallbackLang);
    end;

    begin
      TranslateLCL;
      Application.Initialize;
      Application.CreateForm(TForm1, Form1);
      Application.Run;
    end.
</code>
  <p>
    <b>Note for Mac OS X</b>:
  </p>
  <p>
    The supported language IDs should be added into the application bundle property list to CFBundleLocalizations key, see <file>lazarus.app/Contents/Info.plist</file> for an example.
  </p>
</descr>

<element name="TStringsType">
<short/>
<descr/>
<seealso/>
</element>
<element name="TStringsType.stLrj">
<short>Lazarus resource string table in JSON format.</short>
</element>
<element name="TStringsType.stRst">
<short>FPC resource string table (prior to FPC 2.7.1).</short>
</element>
<element name="TStringsType.stRsj">
<short>FPC resource string table in JSON format (since FPC 2.7.1).</short>
</element>

<element name="TTranslateUnitResult">
<short/>
<descr/>
<seealso/>
</element>
<element name="TTranslateUnitResult.turOK">
<short/>
</element>
<element name="TTranslateUnitResult.turNoLang">
<short/>
</element>
<element name="TTranslateUnitResult.turNoFBLang">
<short/>
</element>
<element name="TTranslateUnitResult.turEmptyParam">
<short/>
</element>

<element name="TTranslationStatistics">
<short/>
<descr/>
<seealso/>
</element>
<element name="TTranslationStatistics.Translated">
<short/>
</element>
<element name="TTranslationStatistics.Untranslated">
<short/>
</element>
<element name="TTranslationStatistics.Fuzzy">
<short/>
</element>

<element name="TPOFileItem">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.FInitialFuzzyState"/>
<element name="TPOFileItem.FVirtualTranslation"/>

<element name="TPOFileItem.Tag">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.LineNr">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.Comments">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.IdentifierLow">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.Original">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.Translation">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.Flags">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.PreviousID">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.Context">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFileItem.Create">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFileItem.Create.TheIdentifierLow">
<short/>
</element>
<element name="TPOFileItem.Create.TheOriginal">
<short/>
</element>
<element name="TPOFileItem.Create.TheTranslated">
<short/>
</element>

<element name="TPOFileItem.ModifyFlag">
<short/>
<descr/>
<errors></errors>
<seealso/>
</element>
<element name="TPOFileItem.ModifyFlag.AFlag">
<short/>
</element>
<element name="TPOFileItem.ModifyFlag.Check">
<short/>
</element>

<element name="TPOFileItem.Identifier">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile">
<short/>
<descr/>
<errors></errors>
<seealso/>
</element>

<element name="TPOFile.FStatisticsUpdated"/>
<element name="TPOFile.FStatistics"/>
<element name="TPOFile.GetStatistics"/>
<element name="TPOFile.GetStatistics.Result"/>

<element name="TPOFile.FItems">
<short/>
</element>

<element name="TPOFile.FIdentifierLowToItem">
<short/>
</element>

<element name="TPOFile.FOriginalToItem">
<short/>
</element>

<element name="TPOFile.FCharSet">
<short/>
</element>

<element name="TPOFile.FHeader">
<short/>
</element>

<element name="TPOFile.FAllEntries">
<short/>
</element>

<element name="TPOFile.FTag">
<short/>
</element>

<element name="TPOFile.FModified">
<short/>
</element>

<element name="TPOFile.FHelperList">
<short/>
</element>

<element name="TPOFile.FPoName">
<short/>
</element>

<element name="TPOFile.Remove">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.Remove.Index">
<short/>
</element>
<element name="TPOFile.Remove.Result">
<short/>
</element>

<element name="TPOFile.GetCount">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.GetCount.Result">
<short/>
</element>

<element name="TPOFile.SetCharSet">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.SetCharSet.AValue">
<short/>
</element>

<element name="TPOFile.GetPoItem">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.GetPoItem.Result">
<short/>
</element>
<element name="TPOFile.GetPoItem.Index">
<short/>
</element>

<element name="TPOFile.ReadPOText">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.ReadPOText.AStream">
<short/>
</element>

<element name="TPOFile.Create">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.Create.Full">
<short/>
</element>
<element name="TPOFile.Create.AFilename">
<short/>
</element>
<element name="TPOFile.Create.AStream">
<short/>
</element>

<element name="TPOFile.Destroy">
<short/>
<descr/>
<seealso/>
</element>

<!-- Params for the Overload -->
<element name="TPOFile.ReadPOText.Txt">
<short/>
</element>

<element name="TPOFile.Translate">
<short/>
<descr/>
<errors></errors>
<seealso/>
</element>
<element name="TPOFile.Translate.Result">
<short/>
</element>
<element name="TPOFile.Translate.Identifier">
<short/>
</element>
<element name="TPOFile.Translate.OriginalValue">
<short/>
</element>

<element name="TPOFile.CharSet">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.Report">
<short/>
<descr/>
<errors></errors>
<seealso/>
</element>
<element name="TPOFile.Report.StartIndex">
<short/>
</element>
<element name="TPOFile.Report.StopIndex">
<short/>
</element>
<element name="TPOFile.Report.DisplayHeader">
<short/>
</element>
<element name="TPOFile.Report.Log">
<short/>
</element>

<element name="TPOFile.CreateHeader">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.UpdateStrings">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.UpdateStrings.InputLines">
<short/>
</element>
<element name="TPOFile.UpdateStrings.SType">
<short/>
</element>

<element name="TPOFile.SaveToStrings">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.SaveToStrings.OutLst">
<short/>
</element>

<element name="TPOFile.SaveToFile">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.SaveToFile.AFilename">
<short/>
</element>

<element name="TPOFile.UpdateItem">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.UpdateItem.Identifier">
<short/>
</element>
<element name="TPOFile.UpdateItem.Original">
<short/>
</element>
<element name="TPOFile.UpdateItem.Flags">
<short/>
</element>
<element name="TPOFile.UpdateItem.ProcessingTranslation">
<short/>
</element>

<element name="TPOFile.FillItem">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.FillItem.CurrentItem">
<short/>
</element>
<element name="TPOFile.FillItem.Identifier">
<short/>
</element>
<element name="TPOFile.FillItem.Original">
<short/>
</element>
<element name="TPOFile.FillItem.Translation">
<short/>
</element>
<element name="TPOFile.FillItem.Comments">
<short/>
</element>
<element name="TPOFile.FillItem.Context">
<short/>
</element>
<element name="TPOFile.FillItem.Flags">
<short/>
</element>
<element name="TPOFile.FillItem.PreviousID">
<short/>
</element>
<element name="TPOFile.FillItem.LineNr">
<short/>
</element>

<element name="TPOFile.UpdateTranslation">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.UpdateTranslation.BasePOFile">
<short/>
</element>

<element name="TPOFile.UntagAll">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.RemoveTaggedItems">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.RemoveTaggedItems.aTag">
<short/>
</element>

<element name="TPOFile.RemoveIdentifier">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.RemoveIdentifier.AIdentifier">
<short/>
</element>

<element name="TPOFile.RemoveIdentifiers">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.RemoveIdentifiers.AIdentifiers">
<short/>
</element>

<element name="TPOFile.RemoveOriginal">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.RemoveOriginal.AOriginal">
<short/>
</element>

<element name="TPOFile.RemoveOriginals">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.RemoveOriginals.AOriginals">
<short/>
</element>

<element name="TPOFile.Tag">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.Modified">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.Items">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.PoName">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.PoRename">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.Statistics">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.InvalidateStatistics">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.FindPoItem">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.FindPoItem.Result">
<short/>
</element>
<element name="TPOFile.FindPoItem.Identifier">
<short/>
</element>

<element name="TPOFile.OriginalToItem">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.OriginalToItem.Result">
<short/>
</element>
<element name="TPOFile.OriginalToItem.Data">
<short/>
</element>

<element name="TPOFile.PoItems">
<short/>
<descr/>
<seealso/>
</element>
<element name="TPOFile.PoItems.Index">
<short/>
</element>

<element name="TPOFile.Count">
<short/>
<descr/>
<seealso/>
</element>

<element name="TPOFile.Header">
<short/>
<descr/>
<seealso/>
</element>

<element name="EPOFileError">
<short/>
<descr/>
<seealso/>
</element>
<element name="EPOFileError.ResFileName">
<short/>
</element>
<element name="EPOFileError.POFileName">
<short/>
</element>

<element name="SystemCharSetIsUTF8">
<short/>
<descr/>
<seealso/>
</element>

<element name="TranslateUnitResourceStrings">
<short/>
<descr/>
<seealso/>
</element>
<element name="TranslateUnitResourceStrings.Result">
<short/>
</element>
<element name="TranslateUnitResourceStrings.ResUnitName">
<short/>
</element>
<element name="TranslateUnitResourceStrings.BaseFilename">
<short/>
</element>
<element name="TranslateUnitResourceStrings.Lang">
<short/>
</element>
<element name="TranslateUnitResourceStrings.FallbackLang">
<short/>
</element>
<element name="TranslateUnitResourceStrings.AFilename">
<short/>
</element>
<element name="TranslateUnitResourceStrings.po">
<short/>
</element>

<element name="TranslateResourceStrings">
<short/>
<descr/>
<seealso/>
</element>
<element name="TranslateResourceStrings.Result">
<short/>
</element>
<element name="TranslateResourceStrings.po">
<short/>
</element>
<element name="TranslateResourceStrings.AFilename">
<short/>
</element>
<element name="TranslateResourceStrings.BaseFilename">
<short/>
</element>
<element name="TranslateResourceStrings.Lang">
<short/>
</element>
<element name="TranslateResourceStrings.FallbackLang">
<short/>
</element>

<element name="UTF8ToSystemCharSet">
<short/>
<descr/>
<seealso/>
</element>
<element name="UTF8ToSystemCharSet.Result">
<short/>
</element>
<element name="UTF8ToSystemCharSet.s">
<short/>
</element>

<element name="UpdatePoFile">
<short/>
<descr/>
<seealso/>
</element>
<element name="UpdatePoFile.Result">
<short/>
</element>
<element name="UpdatePoFile.RSTFiles">
<short/>
</element>
<element name="UpdatePoFile.POFilename">
<short/>
</element>

<element name="UpdatePoFileTranslations">
<short/>
<descr/>
<errors></errors>
<seealso/>
</element>
<element name="UpdatePoFileTranslations.BasePOFilename">
<short/>
</element>
<element name="UpdatePoFileTranslations.BasePOFile">
<short/>
</element>

<element name="sFuzzyFlag">
<short/>
<descr/>
<seealso/>
</element>

<element name="sBadFormatFlag">
<short/>
<descr/>
<seealso/>
</element>

<element name="sFormatFlag">
<short/>
<descr/>
<seealso/>
</element>

<element name="sNoFormatFlag">
<short/>
<descr/>
<seealso/>
</element>

</module>
<!-- Translations -->
</package>
</fpdoc-descriptions>
