No announcement yet.

NSH translation file specification

  • Filter
  • Time
  • Show
Clear All
new posts

  • NSH translation file specification

    The guys at "" are having some question regarding the NSH file specifications:

    When looking at PO files then there are several uncovered areas in regards to this format such as:
    • Plural Forms (If any)
    • Comments
    • Credits
    • Character Encoding
    • Headers
    • Placeholders

    I guess there are more aspects I just don't know.

    Is there any way I can get involved and improve the specs?

  • #2
    There is no spec for the .nsh translation files. It's syntax is the same as other NSIS .nsh files. In short that is:

    - Line comments start with ; or #
    - Block comments (like C) with /* and */
    - Quotes around strings: One of ", ' or ` (Pick what you want but they have to be paired)
    - Preprocessor instructions start with !

    NSIS v2 files are usually encoded in the codepage used by that language. NSIS v3 uses UTF-8 BOM. NSIS v3 also supports inserting Unicode codepoints (${U+1234} etc). NSIS v2 is not accepting new translations, only bugfixes.

    Each string is used in a single place and plural form should follow the English translation. We expect most people to just take the latest English file and translate it:

    The comments/credits at the start is optional but we generally prefer the Windows language id and the authors name there. You can add a e-mail and/or website address there as well if you wish. If there is no author credits in the .nlf nor the .nsh then we will be unable to add your credits to the documentation.

    The next line is a bit tricky and has changed over the years, "!insertmacro LANGFILE" wants

    1) The .nlf filename (you don't have to get this correct, we can change it later if required) but ideally this name should be plain ASCII. It is never displayed to the user.

    2) The English name of the language. Unicode characters are technically allowed but should not happen in practice because English is plain ASCII.

    3) The native official name of the language, in Unicode.

    4) The native name of the language, in ASCII. Might not be possible in all languages but try your best.

    (see French.nsh, Greek.nsh and PortugueseBR.nsh for examples)

    The rest of the strings are just translated from English.
    IntOp $PostCount $PostCount + 1


    • #3
      Updated the original issue

      I've added your reply as a comment in the original issue I've linked to.

      Hoping we'll see some results soon, maybe they'll ask for further elaboration about certain issues.


      • #4
        To Anders
        Is the following line correct?
        !insertmacro LANGFILE "Czech" = "Czech" = "Čeština" = "Cestina"

        Or this line would be better?
        !insertmacro LANGFILE "Czech" = "Czech" "Čeština" "Cestina"


        • #5
          Originally Posted by Vasek View Post
          To Anders
          Is the following line correct?
          !insertmacro LANGFILE "Czech" = "Czech" = "Čeština" = "Cestina"

          Or this line would be better?
          !insertmacro LANGFILE "Czech" = "Czech" "Čeština" "Cestina"
          The last one is almost correct, it must be "Czech" "Czech" "Čeština" "Cestina" or "Czech" = "Čeština" "Cestina"
          IntOp $PostCount $PostCount + 1


          • #6

            So, is the English line in the English.nsh correct?

            !insertmacro LANGFILE "English" = "English" =

            IMHO: This is confusion for the translators.


            • #7
              Yes, it is correct but a bit confusing. = is just a shortcut.
              IntOp $PostCount $PostCount + 1