Context Menu: How to translate Fullscreen and Exit Fullscreen (KRPano 1.19)

  • Apologies in advance - I am not a coder, but I have the task of taking an existing solution provided in English and delivering guidance to others regarding the fields (strings) that need to be changed for localisation purposes. Through investigation and trial and error, I have managed to identify all necessary strings to be translated except for two that are found on the context menu: 'Fullscreen' and 'Exit Fullscreen'.

    I have found an XML file within the solution provided that contains the following code under a heading of context menu (which seemed promising and covers most of the entries - e.g. "Normal View", etc.), but clearly this does not contain entries/captions for the two strings referenced above (and see attachments):

    <!-- context menu -->
    <contextmenu>
    <item name="kr" caption="KRPANO" />
    <item name="fs" caption="FULLSCREEN" />
    <item name="cc" caption="Change Controlmode" onclick="skin_changecontrolmode();" separator="true" />
    <item name="nv" caption="Normal View" onclick="skin_view_normal();" showif="view.vlookatrange == 180" separator="true" />
    <item name="fv" caption="Fisheye View" onclick="skin_view_fisheye();" showif="view.vlookatrange == 180" devices="flash|webgl" />
    <item name="sv" caption="Stereographic View" onclick="skin_view_stereographic();" showif="view.vlookatrange == 180" devices="flash|webgl" />
    <item name="av" caption="Architectural View" onclick="skin_view_architectural();" showif="view.vlookatrange == 180" />
    <item name="pv" caption="Pannini View" onclick="skin_view_pannini();" showif="view.vlookatrange == 180" devices="flash|webgl" />
    <item name="lp" caption="Little Planet View" onclick="skin_view_littleplanet();" showif="view.vlookatrange == 180" devices="flash|webgl" />
    </contextmenu>

    I (believe I) have looked in every single file available to me as part of the solution provided - both XML and HTML, but simply cannot find any reference to strings/captions by these names.

    Have I missed a particular file/section? Or am I looking in the right place, but the required code is not present? If the latter, can anyone provide any guidance as to how to put myself in a position to translate these captions/strings?

    Many thanks.

  • Thanks Klaus - but as mentioned, I am not a coder - presumably you are advising that I add a new entry from the referenced area?

    Is the section of the XML that I referenced the correct one? Perhaps you would be kind enough to show how/where this might be added in relation to the example code I referenced?

    If you can, I would be most grateful.

  • Yes, just change:

    Code
    <contextmenu>

    to:

    Code
    <contextmenu enterfs="Fullscreen" exitfs="Exit Fullscreen">

    or for dynamically changing the texts use:

    Code
    set(contextmenu.enterfs, 'the enter fullscreen text');
    set(contextmenu.exitfs, 'the exit fullscreen text');

    Btw - the order itself in the xml mainly doesn't matter - the xml will be parsed from top-to-down and settings can be defined anywhere and even multiple definitions will be possible, but the later ones will overwrite previous ones.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!