Al T 12 Posted October 23, 2022 Hi, I have only found: https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Types.LoadLangFromFile , but it doesn't tell me anything on the structure of the file being loaded. Can anyone elaborate on the structure of such file? Thanks! Share this post Link to post
Brian Evans 105 Posted October 23, 2022 The language designer can save to a .lng file. See; FMX.Types.TLang - RAD Studio API Documentation (embarcadero.com) Can also create a txt-file template then load from txt-file latter then save as a .lng file. The format of .lng files looks binary but not too complex - a section of strings (xxxx) one per line to translate then sections for a language code and translation pairs (xxxx=yyyy) one per line. 1 Share this post Link to post
pcplayer99 11 Posted November 22, 2022 Hi, Please read: http://docwiki.embarcadero.com/Libraries/Berlin/en/FMX.Types.TLang It says: There are special cases where switching between languages does not work as expected if the language that you switch to is English (en). As a workaround, we recommend that you use LoadLangFromStrings instead of setting TLang.Lang to switch between languages at run time. So, you can save your language file as a text file, it's contain is key=value format. One language, one file. If you want changes the language, load another file. Share this post Link to post
XylemFlow 8 Posted November 30, 2022 I use .ini for language files. This makes it easy for users to create their own language files. Is there any specific advantage of the .lng format over .ini? Share this post Link to post