Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Programm durch .dll Datei mehrsprachig machen (https://www.delphipraxis.net/49674-programm-durch-dll-datei-mehrsprachig-machen.html)

Stony2k 14. Jul 2005 11:44


Programm durch .dll Datei mehrsprachig machen
 
Hiho :)

ich habe gehört, dass man ein Programm mit einer *.dll Datei mehrsprachig machen kann.
ich weiss, dass sowas auch nur einer ini geht, aber dort lönnte der Benuzter dann die Sprache ändern, was bei einer .dll Datei nicht geht, oder?

Weiss wer, wie ich sowas angehen könnte ?

Olli 14. Jul 2005 11:48

Re: Programm durch .dll Datei mehrsprachig machen
 
Üblicherweise geht das über Ressourcen-DLLs. In Delphi gibt es aber noch eine andere Variante. Dort kannst du insbesondere Strings als Ressourcen-Strings in eine DLL einkompilieren, die danach nicht mehr die Endung DLL sondern ein Sprachkürzel hat. Dazu findet sich etwas in der OH. Ich kenne nur nicht das deutsche Stichwort.

Achso, echte reine Ressourcen-DLLs kannste mit Delphi sowieso vergessen. Möglicherweise kann der Linker das, aber es würde wiedermal erfordern die RTL umzuschreiben.

Tip: Wenn du dein Programm richtig lokalisieren willst, solltest du komplett auf Unicode zurückgreifen. Und zwar sowohl in der GUI als auch in den Ressourcen.

Hier noch schnell der Ausschnitt aus meiner OH - leider Englisch :-\ ...
In der OH steht:
The most obvious task in localizing an application is translating the strings that appear in the user interface. To create an application that can be translated without altering code everywhere, the strings in the user interface should be isolated into a single module. Delphi automatically creates a .DFM file that contains the resources for your menus, dialogs, and bitmaps.
In addition to these obvious user interface elements, you will need to isolate any strings, such as error messages, that you present to the user. String resources are not included in the .DFM file. You can isolate them by declaring constants for them using the resourcestring keyword. For more information about resource string constants, see the Object Pascal Language Guide. It is best to include all resource strings in a single, separate unit.

For information on using resource DLLs in your applications see "Creating resource DLLs” and "Using resource DLLs.”

Bernhard Geyer 14. Jul 2005 12:29

Re: Programm durch .dll Datei mehrsprachig machen
 
Schau dir mal GNU GetText an

Stony2k 14. Jul 2005 13:08

Re: Programm durch .dll Datei mehrsprachig machen
 
Gut danke, ich werde es mir mal anschauen.

Olli 14. Jul 2005 13:35

Re: Programm durch .dll Datei mehrsprachig machen
 
Zitat:

Zitat von Bernhard Geyer
Schau dir mal GNU GetText an

Sag mal, woher hast du immer diese guten Links. Hast du eine Linksammlung auf die ich verlinken könnte?!

Bernhard Geyer 14. Jul 2005 19:51

Re: Programm durch .dll Datei mehrsprachig machen
 
Zitat:

Zitat von Olli
Zitat:

Zitat von Bernhard Geyer
Schau dir mal GNU GetText an

Sag mal, woher hast du immer diese guten Links. Hast du eine Linksammlung auf die ich verlinken könnte?!

ist
Fast 10 Jahre Delphi-Entwicklung und unermütliches Googeln. :coder2:


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz