Translation issue

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Translation issue

Post 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
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: Translation issue

Post 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
Post Reply