Old 9th February 2015, 08:28   #1
marcins
Junior Member
 
Join Date: Aug 2011
Posts: 30
problem with russian language (UMUI)

I have problem with russian language. Of course I'm using Unicode version of NSIS.

Most translations is working, but for example "welcome screen" looks like this:



but all others screens are ok, and font is ok!

But still on the last screen I have all in English... or when everything is installed correctly and there is question about restart, then I have again question marks instead of Russian words.


all in english...



I've downloaded new translations from translations subforum and replaced old files.

.nsh file inside UltraModernUI looks ok


both .nsh and .nlf files in .\Contrib\Language files\ are ok also

all files are in UTF-8 w/o BOM. And everything looks ok but not first and last page.
I even tried to manually !define MUI_TEXT_WELCOME_INFO_TEXT inside my installer but it doesn't work either.
marcins is offline   Reply With Quote
Old 9th February 2015, 09:56   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Try this and see if it works (I'm using an unmodified 3.0b1 install):
PHP Code:
Name "Language Test"
OutFile "LangTest.exe"

Unicode True
RequestExecutionLevel User

!include "MUI2.nsh"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "Russian"

Section
  SetAutoClose False
SectionEnd 
Attached Thumbnails
Click image for larger version

Name:	welcome.png
Views:	205
Size:	38.0 KB
ID:	51679   Click image for larger version

Name:	instfiles.png
Views:	171
Size:	31.9 KB
ID:	51680   Click image for larger version

Name:	finish.png
Views:	151
Size:	33.8 KB
ID:	51681  

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 9th February 2015, 10:52   #3
marcins
Junior Member
 
Join Date: Aug 2011
Posts: 30
Thanks for answer but I'm using Ultra ModernUI skin and afasik it's only working with version 2.X of NSIS.
marcins is offline   Reply With Quote
Old 9th February 2015, 11:19   #4
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Wow, I remember when it first came out way back then, I had just started using nsis. The last release is in 2005, which is way before unicode support came in. Quite a bit has changed since then, installoptions has been deprecated for nsdialogs, the plugin api has changed, the latest nsis releases support ansi and unicode, plus unofficial 64 bit support.

The welcome and finish dialogs (and who knows what other dialogs) use installoptions, and I think all the files in UMUI are ansi (I doubt they are utf-8 with no bom but I'm probably wrong).

So probably the only way to get the dialogs to show the correct language is to rewrite the UMUI dialogs to use nsdialogs instead of installoptions.

Really UMUI needs a basic update to support newer nsis versions. I might have a crack at it sometime just for fun, but I'm not promising anything.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 9th February 2015, 11:23   #5
marcins
Junior Member
 
Join Date: Aug 2011
Posts: 30
Thanks for help anyway JasonFriday13!
marcins is offline   Reply With Quote
Old 9th February 2015, 11:29   #6
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
I noticed the sourceforge page has a download as recent as 2010, maybe give that a try: http://sourceforge.net/projects/ultr...%201.00b2-dev/

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 9th February 2015, 12:19   #7
marcins
Junior Member
 
Join Date: Aug 2011
Posts: 30
I already have it.

But funny thing is that when you look inside zip package and then Language files you will notice that some of language files are empty. For example Russian.nsh is. But then still even if I replace this with other translated .nsh file I still got "????".

Ill try to do another check on clean virtual machine.
marcins is offline   Reply With Quote
Old 9th February 2015, 12:52   #8
marcins
Junior Member
 
Join Date: Aug 2011
Posts: 30
Well on clean system I have same problem. Welcome page is only question marks and all other screens are translated.

It looks like this is a bug in UMUI :/
marcins is offline   Reply With Quote
Old 9th February 2015, 18:00   #9
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 21
Hi, Marcin
RU: Я также использую NSIS UNICODE(2.46.5 ++), только все файлы *.nsi и *.nsh, сохраняю в кодировке: UTF-16 LE. Создаю мульти-язычные инсталляторы и никаких проблем нет.
Возможно в этом ваша проблема..

EN: I also use NSIS UNICODE(2.46.5 ++), but all files *.nsi and *.nsh, save encoding: UTF-16 LE. Creating multilingual installers and no problems.
Possibly in this your problem..
MaGoth is offline   Reply With Quote
Old 9th February 2015, 18:08   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
I'm guessing the Install Options .ini files need a UTF16-LE BOM...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th February 2015, 06:50   #11
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 562
Send a message via ICQ to T.Slappy
Install Options plug-in does not support Unicode (at all!).

Use nsDialogs plug-in (which means you will need to rewrite some part of UMUI).

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 10th February 2015, 07:38   #12
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Wink

Quote:
Originally Posted by T.Slappy View Post
Install Options plug-in does not support Unicode (at all!).
What? As long as the .ini is a UTF16LE file with a BOM it should work when building Unicode installers...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 12th February 2015, 05:32   #13
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 562
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by Anders View Post
What? As long as the .ini is a UTF16LE file with a BOM it should work when building Unicode installers...
I had aslo some issues with InstallOptions in Unicode installers (so I can confirm this behavior).

After some research I found this old forum: http://forums.winamp.com/showthread.php?t=275900

As there are known these problems for long time I suppose it is true.

Use nsDialogs instead - nsDialog is much much much better (and faster and reliable and provides more functionality etc. etc.!

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 12th February 2015, 17:26   #14
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Quote:
Originally Posted by T.Slappy View Post
I had aslo some issues with InstallOptions in Unicode installers (so I can confirm this behavior).
How many times to I have to repeat myself, the .ini needs a UTF16LE BOM. Finding a 8 year old thread does not really matter, this only applies to NSIS 3...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 11th February 2015, 06:54   #15
marcins
Junior Member
 
Join Date: Aug 2011
Posts: 30
well thank you guys for answers... but i still can't figure it out...

I define in my .nsi file something like this.

code:
!define MUI_TEXT_WELCOME_INFO_TITLE "!! Вас приветствует мастер установки TEST"


all I can see is "??? ???????? ?????? ????????? TEST".

I was trying with UTF-8, UTF-16LE and other formats. Next page is working fine but not first...

and I'm not using options.ini file, at least I don't know nothing about it.

@MaGoth are you using Ultra ModernUI?
marcins is offline   Reply With Quote
Old 11th February 2015, 12:02   #16
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 21
Hi marcins,
It all depends on the situation, but problems like you I do not.
Can you send me a PM in your project files *.nsh and *.nsi?
MaGoth is offline   Reply With Quote
Old 12th February 2015, 17:28   #17
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
So, for the final time, if the .ini starts with a UTF16LE BOM then the Wide versions of the Windows ini functions will read UTF16 files correctly:
Quote:
Unicode true

Page custom myIO

!include InstallOptions.nsh

Function myIO
InitPluginsDir
FileOpen $0 "$pluginsdir\io.ini" w
FileWriteUTF16LE $0 ${U+FEFF}
FileClose $0
WriteIniStr $pluginsdir\io.ini "Settings" NumFields 1
WriteIniStr $pluginsdir\io.ini "Field 1" Type Label
WriteIniStr $pluginsdir\io.ini "Field 1" Text "H${U+20AC}llo World from ${U+2115}SI${U+53}\n${U+D3EC}${U+BBF8}${U+B2DB}\n${U+1F47E}|ALIEN MONSTER|${U+1F61E}\n${U+3371} (SQUARE HPA = U+3371)\n${U+10400} (DESERET CAPITAL LETTER LONG I = U+d801 U+dc00)"
WriteIniStr $pluginsdir\io.ini "Field 1" Left 10
WriteIniStr $pluginsdir\io.ini "Field 1" Top 10
WriteIniStr $pluginsdir\io.ini "Field 1" Right -10
WriteIniStr $pluginsdir\io.ini "Field 1" Bottom -10
!insertmacro INSTALLOPTIONS_DISPLAY "io.ini"
FunctionEnd

Section
SectionEnd

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump