It is the demo gifviewer is trandlated to english or french when you change language ?I did not test with gifviewer, just with a regular file.
If i do ExtractFilePath(Application.ExeName) it returns:Yes because gifview.app(bundle) is basically a directory. When you're done with the development, you should copy the executable "gifview"(located in your main development folder) into the bundle("gifview.app/Contents/MacOS/") and replace the symlink with the executable. You can achieve this by right clicking gifview.app then "Show Package Contents". It's common practice(OSX) to keep the resources(images, language files, etc) inside the bundle, however if you wish a solution which will work on every major platform you can do something like this:
"/Users/usename/Documents/Projets/Lazarus/Components/GIFViewer/demos/gifview.app/Contents/MacOS/"
QuoteIt is the demo gifviewer is trandlated to english or french when you change language ?I did not test with gifviewer, just with a regular file.QuoteIf i do ExtractFilePath(Application.ExeName) it returns:Yes because gifview.app(bundle) is basically a directory. When you're done with the development, you should copy the executable "gifview"(located in your main development folder) into the bundle("gifview.app/Contents/MacOS/") and replace the symlink with the executable. You can achieve this by right clicking gifview.app then "Show Package Contents". It's common practice(OSX) to keep the resources(images, language files, etc) inside the bundle, however if you wish a solution which will work on every major platform you can do something like this:
"/Users/usename/Documents/Projets/Lazarus/Components/GIFViewer/demos/gifview.app/Contents/MacOS/"
var PathToLangFiles: String; begin {$IFDEF LCLcarbon} PathToLangFiles := Copy(Application.ExeName, 1, Pos(ApplicationName + '.app', Application.ExeName) - 1) + PathDelim + 'languages'; {$ELSE} PathToLangFiles := Application.ExeName + PathDelim + 'languages'; {$ENDIF} end;
The above code will return the languages directory located in the main development folder, beside the executable(bundle on osx).
Thanks Getmem it solve the path problem, but ui is never translated :oYou're welcome. Did you try to debug it? Unfortunately the debugger is not working properly on my OSX.
You're welcome. Did you try to debug it? Unfortunately the debugger is not working properly on my OSX.