Einzelnen Beitrag anzeigen

Benutzerbild von Mithrandir
Mithrandir
(CodeLib-Manager)

Registriert seit: 27. Nov 2008
Ort: Delmenhorst
2.379 Beiträge
 
#8

Re: nonVCL Anwendung lokalisieren

  Alt 21. Nov 2009, 15:34
Japp, so dachte ich mir das jetzt auch. Und der Übung wegen schreibe ich mir dafür einen kleinen Parser, der das Format liest, was ich mir da zusammengefrickelt habe:

Delphi-Quellcode:
// Translation File for SmallTune
// Language: German
// Author: Daniel Gilbert
// Mail: [email]xxx@yyyyyyyy.zzz[/email]

// Must match Application Minor Version
// e.g. "0.3" will work for SmallTune 0.3.0, SmallTune 0.3.1, SmallTune 0.3.2 and so on, but not SmallTune 0.4.0...
TRANS_FILE_VERSION=0.3;

//Short Description:
//
//The default Format is:
//
//index:'Text';
//
//In case you need a ' in your text (e.g.: isn't), you can write it like this:
//
//0:'This isn''t a problem';
//
//In case you need a linebreak, this can be done this way:
//
//0:'This is the first line' + #13#10 + 'this is the next line';
//
// NEVER EVER change the index and the line order. Doing so will result in an error and the language won't be loaded

//Windows XP or NT 4.0 needed!
0:'Windows XP or NT 4.0 needed!';
//[Playing]
1:'[Playing]';
//[Pause]
2:'[Pause]';
//[Stop]
3:'[Stop]';
//Adding files... please wait...
4:'Adding files... please wait...';
//Previous track
5:'Previous track';
Gewinnt vielleicht keinen Design-Award, aber funktioniert (hoffentlich).
米斯蘭迪爾
"In einer Zeit universellen Betruges wird das Aussprechen der Wahrheit zu einem revolutionären Akt." -- 1984, George Orwell
  Mit Zitat antworten Zitat