Designer Component - Translation

Posted by: mhill on 24 July 2021, 8:40 am EST

    • Post Options:
    • Link

    Posted 24 July 2021, 8:40 am EST

    Hi,

    I am using the SpreadJS Designer Component - I would like to translate all the text in the buttons, groups and tabs/menus. Please could you point me in the direction of how to do that - ideally without having to modify the config.json.

  • Posted 26 July 2021, 2:00 am EST

    Hi,

    We are sorry but currently, we do not publish any public APIs for custom translations. We have plans to support this in near future but we do not have an ETA for the same(Internal tracking ID: SJS-7209).

    Till then you may refer to the attached sample for workaround:

    designer.zip

    Regards

  • Posted 26 July 2021, 5:28 am EST

    Ah, ok. I can see how that works. That’ll be fine for me. Thank you very much!

  • Posted 28 July 2021, 2:18 pm EST - Updated 3 October 2022, 9:42 am EST

    Hi again,

    I have been able to get your example working just fine with the v14.0.5 as you sent:

    However, I am using v14.1.3, and when I try the same code with that version, it fails horribly:

    To be clear - if I change the .html file you sent me to use 4.1.3 instead of 14.0.5, then it fails:

    
    <!DOCTYPE html>
    <html x:lang="en">
    
    <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <title>SpreadJS Designer</title>
        <link href="http://cdn.grapecity.com/spreadjs/hosted/css/gc.spread.sheets.excel2013white.14.1.3.css" rel="stylesheet" type="text/css"/>
        <link href="http://cdn.grapecity.com/spreadjs/hosted/css/gc.spread.sheets.designer.14.1.3.min.css" rel="stylesheet" type="text/css"/>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/gc.spread.sheets.all.14.1.3.min.js"></script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/plugins/gc.spread.sheets.charts.14.1.3.min.js"></script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/plugins/gc.spread.sheets.shapes.14.1.3.min.js"></script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/plugins/gc.spread.sheets.print.14.1.3.min.js"></script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/plugins/gc.spread.sheets.barcode.14.1.3.min.js"></script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/plugins/gc.spread.sheets.pdf.14.1.3.min.js"></script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/interop/gc.spread.excelio.14.1.3.min.js"></script>
    
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/gc.spread.sheets.designer.resource.en.14.1.3.min.js"></script>
        <script src="resource.js"></script>
        <script>
            Object.keys( customRes ).forEach( ( key ) => {
                GC.Spread.Sheets.DesignerRes.res[key] = customRes[key];
            } );
        </script>
        <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/gc.spread.sheets.designer.all.14.1.3.min.js"></script>
        <script>
            window.onload = function () {
                var designer = new GC.Spread.Sheets.Designer.Designer(
                        document.getElementById( "designer_host" )
                );
            }
        </script>
    </head>
    
    <body>
    <div id="designer_host" style="width:100%;height:98vh;border:1px solid darkgray"></div>
    </body>
    
    </html>
    
    

    I’d really appreciate it if you could point me to how I can get some form of translation going for the Designer in v14.1.3.

    Thanks very much!

  • Posted 29 July 2021, 12:44 am EST

    Hi,

    Thanks for the information. We are able to observe the issue at our end hence we forwarded this issue to the concerned team for further investigation. We will update you regarding this as we get any information.

    Regards

    Avinash

  • Posted 29 July 2021, 4:46 am EST

    Hi,

    The team has provided the updated workaround. Please refer to the following attached sample and let us know if you face any issues.

    Regards

    Avinash

    designerLatest.zip

  • Posted 29 July 2021, 9:55 am EST - Updated 3 October 2022, 9:42 am EST

    Hi. Thank you so much for that. I’ve been able to get the translation working on my 8.1.3 version. Please thank the team for me.

    FYI - I’ve spotted a couple of anomalies:

    These items seem to be in the json in a special way:

    
          newTabTip: "Show/Hide NewTab",
    [b]      zoomToSelection: "ZoomTo Selection",
          zoomToSelection1: "ZoomTo Selection",[/b]
    [b]      freezePane: "Freeze Pane",
          freezePane1: "Freeze Pane",
    [/b]      freezeTopRow: "Freeze Top Row",
          freezeFirstColumn: "Freeze First Column",
          freezeBottomRow: "Freeze Bottom Row",
          freezeLastColumn: "Freeze Last Column",
    [b]      unFreezePane: "Unfreeze Pane",
          unFreezePane1: "Unfreeze Pane"
    [/b]
    

    Thanks again!

    Mark

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels