Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Is it possible or not to apply i18n strings in properties section?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is it possible or not to apply i18n strings in properties section?

    For example, I have some properties in Russian for Russian traders, but also I want to have English version for traders who don't know Russian. Maybe thre is some approach to create i18n strings for properties? http://prntscr.com/k9ytr9
    Handlar
    NinjaTrader Ecosystem Vendor - Handlar

    #2
    Hello handlar,
    Thanks for your post.

    I am currently looking into this for you. I'll let you know when I have a little more information.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Officially this is unsupported territory. However, this test script created by my colleague NinjaTrader_MichaelM is intended to show how to do localization inside an indicator using the method GetTranslation().
      You most likely would need to extend this to support enums, but this should get you started.

      I'll leave this post open for anyone else that would like to contribute as well.
      Attached Files
      Josh G.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_JoshG View Post
        Officially this is unsupported territory. However, this test script created by my colleague NinjaTrader_MichaelM is intended to show how to do localization inside an indicator using the method GetTranslation().
        You most likely would need to extend this to support enums, but this should get you started.

        I'll leave this post open for anyone else that would like to contribute as well.
        Thank you so much, JoshG!
        Handlar
        NinjaTrader Ecosystem Vendor - Handlar

        Comment


          #5
          One more question about settings. Maybe there is some approach to hide some settings for all users, but show all settings for admins?
          Maybe a list of machineid, each machineid will allow see all settings. But if you are usual trader and your machine id is not in the list - you will see only part of settings.

          I tried it, but got errors during compilation. I tried describe parameters inside if-else...
          http://prntscr.com/ka9ip3 but this is wrong.

          I'll try add machineid check in public class MyConverter : IndicatorBaseConverter
          Last edited by handlar; 07-24-2018, 02:33 AM.
          Handlar
          NinjaTrader Ecosystem Vendor - Handlar

          Comment


            #6
            First, I just suggest creating two separate scripts as that will be much easier. Unfortunately we are limited by the amount of support we can provide with this.

            Off the top of my head you may be able to try conditional compilation or conditional attributes, although I am not sure if either would actually work.
            I will include the public msdn links below about conditional compilation and conditional attributes.

            I will also leave this post open if any other members would like to contribute.

            Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.


            Josh G.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by geotrades1, Today, 10:02 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by ender_wiggum, Today, 09:50 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by rajendrasubedi2023, Today, 09:50 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by bmartz, Today, 09:30 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by geddyisodin, Today, 05:20 AM
            3 responses
            27 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X