![]() |
#1 |
Junior Member
Join Date: Aug 2004
Location: Japan
Posts: 37
|
Create language file with user defined messages
Hi all,
As I want to create a installer with 15 languages support, and there are almost 100 user defined messages for each language. How do I create variables for these string and call themm appropriately in different languages. I thought of creating my own .nlf file for each languages containing all the messages, but I don't know the predefined variable name to be used. Thanks in advance. Regards VCR |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Feb 2004
Posts: 58
|
if you are talking about "custom" strings ...then this is a HUGE undertaking as each string has to be defined seperately in each language,If you are talking about the MUI strings then there are .nsh files you can include.you will have to use langstring for each custom string like this...
PHP Code:
|
![]() |
![]() |
![]() |
#3 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Aug 2004
Location: Japan
Posts: 37
|
Thanks for your help.
I need the "custom" strings support as each string has to be defined seperately in each language. Can anyone tell me the complexity and tell me how can we do this? Thanks again. |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Feb 2004
Posts: 58
|
look at langstring in the docs..and I hope you dont have alot of them you will have to convert all of them from english to all 15 languages.Each string
![]() |
![]() |
![]() |
![]() |
#6 |
Major Dude
|
In my program I use the a language system that the user can customize the language files as they wish, contributing to the project (like we do for NSIS). To work, this language system needs:
1) Language INI files. Format: 2) Variable to store what language file the user chose:code: 3) Multilanguage support macros:code: 4) To create a language selector inside your program that changes the variable $LangFile when the user selects another language file.code: 5) To read a string from the language selected file: - First, you need to define the page name or section of a part of your program using the macro: - Then to read from a value name of this page or section:code: code: |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Aug 2004
Location: Japan
Posts: 37
|
Thanks for ur support.
Can u please give me one example source code. Lets suppose my custom string in english is RMV_STRING Remove Complete RMV_STRING1 Remove in progress .... ..... ..... almost 100 messages and the corresponding string in French is as RMV_STRING Désinstallation terminée ........ like wise the string in 15 other languages are also available. Now as these are my custom messages, I want these to be displayed as a message box in the language, the user has choosen the language of installation. So can any one give me full guide for this. Thanks in advance VCR |
![]() |
![]() |
![]() |
#8 |
Major Dude
|
Generally when you get a string from an INI file, NSIS doesn't convert it to support $\t, $\r and $\n (you have the text but NSIS doesn't see the characters as escape characters). I'll create for you a code for this when I come back here. Or maybe someone wants to do it for me first...
|
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
|
See my example (link below).
|
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Aug 2004
Location: Japan
Posts: 37
|
Thanks for providing the sources. I wil go through it.
Thanks and Regards VCR |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|