Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-09-2025, 23:39
nodesire7 nodesire7 is offline
Registered User
 
Join Date: Sep 2025
Location: China
Posts: 15
Thanks: 4
Thanked 2 Times in 2 Posts
nodesire7 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
I won't help you here, try translating everything in the russian.ini or english.ini file yourself. that's where it's translated.
I've tried these methods, but I can't translate this part. It needs to be forcibly replaced in Inno Setup because it's a parameter in the DLL. If I want to change it, I have to modify the DLL.

Code:
// 替换时分秒
function ReplaceTimeUnits(TimeStr: WideString): WideString;
var
i: Integer;
begin
Result := TimeStr;

// 先处理复数形式,再处理单数形式,避免替换不完整
while Pos(' hrs', Result) > 0 do
Result := Copy(Result, 1, Pos(' hrs', Result) - 1) + ' 小时' + Copy(Result, Pos(' hrs', Result) + 4, Length(Result));

while Pos(' hr', Result) > 0 do
Result := Copy(Result, 1, Pos(' hr', Result) - 1) + ' 小时' + Copy(Result, Pos(' hr', Result) + 3, Length(Result));

while Pos(' secs', Result) > 0 do
Result := Copy(Result, 1, Pos(' secs', Result) - 1) + ' 秒' + Copy(Result, Pos(' secs', Result) + 5, Length(Result));

while Pos(' sec', Result) > 0 do
Result := Copy(Result, 1, Pos(' sec', Result) - 1) + ' 秒' + Copy(Result, Pos(' sec', Result) + 4, Length(Result));

while Pos(' mins', Result) > 0 do
Result := Copy(Result, 1, Pos(' mins', Result) - 1) + ' 分钟' + Copy(Result, Pos(' mins', Result) + 5, Length(Result));

while Pos(' min', Result) > 0 do
Result := Copy(Result, 1, Pos(' min', Result) - 1) + ' 分钟' + Copy(Result, Pos(' min', Result) + 4, Length(Result));
end;

function ProgressCallbackEx(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB, TotalFiles, CurFiles: Integer; DiskName, CurrentFile, RemainsTime, ElapsedTime, CurSpeed, AvgSpeed: WideString): longword;
begin
Page4Arc.Angle(OverallPct, 1000);
Page4Lbl[2].Text(IntToStr(OverallPct div 10) + '%');
Page4Lbl[11].Text(': ' + CurrentFile);
Page4Lbl[12].Text(': ' + ReplaceTimeUnits(RemainsTime));
Page4Lbl[13].Text(': ' + ReplaceTimeUnits(ElapsedTime));
Page5Lbl[3].Text(CustomMessage(UILang + 'Page5Lbl3') + #9 + ': ' + ReplaceTimeUnits(ElapsedTime));

Result:= ISArcExCancel;
end;
I succeeded by modifying it this way.



I checked other script, and it's all similar. Making slight modifications, similar to what I sent, allows for successful replacement.

Last edited by nodesire7; 09-09-2025 at 23:41.
Reply With Quote
The Following User Says Thank You to nodesire7 For This Useful Post:
audiofeel (28-12-2025)
Sponsored Links
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASIS: Advanced Simple Installer Script KaktoR Conversion Tutorials 1480 08-07-2026 10:58
FMXInno - Windows Fluent Design Installer UI for Inno BLACKFIRE69 Conversion Tutorials 628 02-07-2026 16:10
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05
Installer Creator Source Code Razor12911 Conversion Tutorials 19 13-12-2015 10:20



All times are GMT -7. The time now is 20:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com