Jump to content
You must now use your email address to sign in [click for more info] ×

Affinity Pascal would be great


Recommended Posts

4 hours ago, William Overington said:

Please say if I am mistaken, yet is the significant difference between what you are writing about and what I am writing about is that your solution is local to the particular manufacturer and possibly the particular program, whereas my research is on a set of codes that are aimed at being an international open source standard such that a particular 'key' has the same meaning everywhere and that the sentence.dat file is an open source format usable everywhere?

What I've shortly sketeched above is a common general standard used in programming to handle and deal with localisation. It's supported in an equally manner by all better development environments for certain programming languages on all platforms. - Meaning here that a common datastructure (a HashMap<key, value>) is used to handle localization entries in plain UTF-8 character based text files for the different localizations. Here the <key> text entry is used to identify/determine which text part <value> to use.

In other words, the <key> is like your "!123" etc. and the <value> is what is returned then (all the text associated to the specific key). The localized text dependents on the setup localization used in prog code, but can also be autodected from the users used OS system language. Pretty much the way which every localized application on your system uses dependent on your systems language setting. Aka ...

sentence.dat_en
-----------------
line1  = This is the first used line for an english localization.
line7  = Here's another line we insert for english localization.
para1 = A longer text paragraph in english language here ...

sentence.dat_de
-----------------
line1  = Dies ist die erste Zeile für die deutsche Lokalisierung.
line7  = Hier ist eine weitere Zeile für die deutsche Lokalisierung.
para1 = Ein längerer Text-Paragraph hier in deutscher Sprache ...

 

In/from your Pascal code you will then reuse/call the localization methods and pass just over the wanted <key>, for example <line7> in order to get all the text associated with "line7" for the actually used localization, so in "en, de, ... whatever".

The above localization handling method is common usage in all dev environments and for all platforms. It's a common way used to write localization aware software.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

For the "Lazarus IDE + FreePascal" see related to the above said about localization handling also the following ...

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

On 2/20/2022 at 7:18 PM, v_kyr said:

True. - Further if the OP might use the Lazarus IDE for FreePascal, it should be like using Delphi here (aka the more modern TurboPascal ), since Lazarus is highly modeled after Delphi.

Yes, and Delphi was built partially on Turbo Pascal, while Lazarus is built on FreePascal which in turn was modeled after Turbo Pascal, but programming in Delphi / Lazarus is rather different from the way that Turbo Pascal was programmed (under DOS).  Using FreePascal without Lazarus would likely be a better fit for someone trying to recreate the Turbo Pascal experience (command-line with a text-based IDE), while using Lazarus mimics Delphi and allows for creating GUI-oriented apps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.