-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PO files folder #123
Comments
The procedure which loads PO files seems to be this one: // src/corelib/fpg_translations.pas
procedure TranslateResourceStrings(const BaseAppName, BaseDirectory, CustomLang: string); It is called here: // corelib/fpg_main.pas
TranslateResourceStrings(ApplicationName, ExtractFilePath(ParamStr(0)), ''); So I imagine that we could do something like this: TranslateResourceStrings(ApplicationName, ExtractFilePath(ParamStr(0)){$IFDEF USE_LANGUAGES_FOLDER} + 'languages'{$ENDIF}, ''); |
That's a good point. It probably wasn't a wise choice to place them in the same directory as the application executable. Your suggestion of a Let me just research a few options and I'll come back to you. For example
|
Hello Graeme. Other (not very important) question related to PO files. With LCL applications, you can force the language with |
Crap, I never got back to this thread - my bad. I'll make sure I commit options 2 & 3 from my last message. As for your latest question... From memory, we don't have a '--lang' command line parameter in fpGUI, but you could do the same on Linux/FreeBSD as follows:
This will apply the language override, just for that one command (in this example the command is to run the ./fontselect application). By default, fpGUI looks at the LANG environment variable (I can't remember if that is true for Windows as well), and in Windows, it also looks at the Windows Registry for the current user. |
Thank you Graeme. Indeed, it works. For the other question, the option 2 would be perfect for me. |
I have just added PO files to an application of mine. It was very easy, and it works fine.
Is it possible to put the PO files in a dedicated directory, or is it mandatory to let them in the directory of the application?
The text was updated successfully, but these errors were encountered: