How can I display my license and readme files in the language selected?

Answered

Comments

1 comment

  • Avatar
    Jake

    You can specify multiple license files using the <licenseFileList> tag. You will still need to use a regular <licenseFile> tag inside the project xml: it will be used as the default license file in case there's no custom license file for the current language.

    Inside this tag, you can add as many <licenseFile> tags as license files you'll provide. For each <licenseFile> entry, you'll need to provide the license file path, its language identifier and the file encoding.

    Here's an example of how it works:

    <licenseFileList>
          <licenseFile>
                  <code>en</code>
                  <file>/home/user/license-english.txt</file>
                  <encoding>iso8859-1</encoding>
          </licenseFile>
          <licenseFile>
                  <code>jp</code>
                  <file>/home/user/license-japanese.txt</file>
                  <encoding>utf-8</encoding>
          </licenseFile>
          <licenseFile encoding="utf-8" code="es" file="/home/user/license-spanish.txt" />
    </licenseFileList>
    

    The installer will pick the right license file depending on the current selected language for the installer.

    You can do a similar arrangement with readme files and the <readmeFileList> tag:

    <readmeFileList>
          <readmeFile>
                  <code>en</code>
                  <file>/home/user/readme-english.txt</file>
                  <encoding>iso8859-1</encoding>
          </readmeFile>
          <readmeFile>
                  <code>jp</code>
                  <file>/home/user/readme-japanese.txt</file>
                  <encoding>utf-8</encoding>
          </readmeFile>
          <readmeFile encoding="utf-8" code="es" file="/home/user/readme-spanish.txt" />
    </readmeFileList>
    

Please sign in to leave a comment.