Page 1 of 1

Translation issue

Posted: Fri Aug 02, 2019 12:40 pm
by Isabelle
Hello everyone,

I am using the Oxygen SDK 21.1.0.2 and I have noticed an issue in English translation.

For the action insert paragraph, the English description is
Insert a new paragraph in the document (Ctrl+maj+P)
instead of
Insert a new paragraph in the document (Ctrl+Shift+P)
In English it is not Maj but Shift.

Regards,
Isabelle

Re: Translation issue

Posted: Mon Aug 05, 2019 4:01 pm
by sorin_carbunaru
Hello,

Unfortunately I don't know exactly what you trying to do, but a colleague of mine suggested that you may be integrating the Author Component. Is that right? :) If you do, after the UI language is set ( I suppose there is something like "Locale.setDefault(locale) )", you could try doing the following:

Code: Select all

    try {
      Field resourcesField = Toolkit.class.getDeclaredField("resources");
      resourcesField.setAccessible(true);

      //Use reflection to avoid dependencies on sun packages.
      Method rbInstanceGetter = Class.forName("sun.util.CoreResourceBundleControl").getMethod("getRBControlInstance", (Class[])null);
      resourcesField.set(null, ResourceBundle.getBundle("sun.awt.resources.awt", 
          (Control) rbInstanceGetter.invoke(null, (Object[])null)));
    } catch(Throwable t) {
      logger.warn("Could not use specific locale for Toolkit; using the default platform locale.", t);
    }
This should also set the right language for the key strokes.

Let me know how it goes.

Best wishes,
Sorin Carbunaru
oXygen XML