Skip to content
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

Feature request: Codex localization matches the IDE localization settings #41

Open
SoftFour opened this issue Oct 23, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@SoftFour
Copy link

Hi Dave,

I'm using the great Codex tool under my RadStudio IDE in Germany, but with English localization in the IDE.
This means, all my IDE menu's were in usually in English.

When I use Codex, I notice that their menu's were translated to German, which looks a little odd with the mixed languages.
It seems IDE translated to German
grafik
grafik

while other pages stay still in English
grafik

I assume you choose the PC'S local language for the translation selection,
would it be possible to use the IDE language selection instead, so that the menu text language will match all other IDE text language?

@DelphiWorlds DelphiWorlds self-assigned this Oct 24, 2024
@DelphiWorlds DelphiWorlds added the bug Something isn't working label Oct 24, 2024
@DelphiWorlds
Copy link
Owner

Yes, it would make sense for the Codex translations be based on the language that was used for Delphi. Just wondering whether this should be a configurable option? To me the answer would be: "no"

@SoftFour
Copy link
Author

SoftFour commented Oct 24, 2024

Perhaps this would be possible via registry
grafik

or the locales

grafik

Not sure if this can be reached via IOTA, like that

uses
  ToolsAPI, System.Win.Registry, Winapi.Windows, System.SysUtils;

function GetIDELanguage: string;
var
  BaseRegistryKey: string;
  Registry: TRegistry;
begin
  Result := '';
  // Zugriff auf das IOTAServices-Interface, um den Basis-Registrierungsschlüssel zu erhalten
  BaseRegistryKey := (BorlandIDEServices as IOTAServices).GetBaseRegistryKey;
  Registry := TRegistry.Create(KEY_READ);
  try
    Registry.RootKey := HKEY_CURRENT_USER;
    // Öffnen des Basis-Registrierungspfads
    if Registry.OpenKeyReadOnly(BaseRegistryKey) then
    begin
      if Registry.ValueExists('InstallLanguage') then
      begin
        Result := Registry.ReadString('InstallLanguage');
        Exit;
      end;
    end;
    // Falls 'InstallLanguage' nicht vorhanden ist, 'Localization\Language' prüfen
    if Registry.OpenKeyReadOnly(BaseRegistryKey + '\Localization') then
    begin
      if Registry.ValueExists('Language') then
        Result := Registry.ReadString('Language');
    end;
  finally
    Registry.Free;
  end;
end;

It seems to be "InstallLanguage" in newer IDE and "Language" in older,
but I have not tested this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants