Einzelnen Beitrag anzeigen

Olli
(Gast)

n/a Beiträge
 
#2

Re: Programm durch .dll Datei mehrsprachig machen

  Alt 14. Jul 2005, 11:48
Ü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.”
  Mit Zitat antworten Zitat