Skip to content
⌘ NSIS Forum Archive

custom sections and language files

5 posts

sealite#

custom sections and language files

How can I use translations strings for custom pages.
I don't want to create a custom page for every language - this is very hard to maintain.

How can I do this (in 2.0b4)?

This is an example of custom ini
[Settings]
NumFields=2

[Field 1]
Type=label
Text=Organization Name
Left=0
Right=220
Top=0
Bottom=10

[Field 2]
Type=text
Left=0
Right=220
Top=10
Bottom=25
MinLen=5
ValidateText=Please enter the organization name

sealite#
How? It doesn't seam to work.

Text=Organization Name
I've tryed with

Text=$(LOCALE_TEST)
Text=LOCALE_TEST

(LOCALE_TEST is my language variable)
It doesn't work!
deguix#
I.e.:

LangString ORGANIZATION_NAME ${LANG_ENGLISH} "Organization Name"
LangString ORGANIZATION_NAME ${LANG_PORTUGUESEBR} "Nome da Organização"
Section
  ...
  WriteINIStr "filename.ini" "Field 1" "Text" "$(ORGANIZATION_NAME)"
  ...
SectionEnd