Multilanguage Addin

deV.chdeV.ch Member Posts: 543
edited 2010-10-11 in NAV Three Tier
I created a few addins and now i want to make these multilanguage enabled, but i don't know how to get the Culture that is selected in the RTC Client. I thought Application.CurrentCulture would give me the currently selected (language but unfortunatly it doesn't.

Any ideas? :?:

Comments

  • vasilis6669vasilis6669 Member Posts: 109
    Hi,

    When you select the language from the client, for any CaptionML you have the language defined, it will display the langauage selected.


    Regards,
    Vasilis Chralambous
  • deV.chdeV.ch Member Posts: 543
    I don't know if you realy know what i want to do. i know how to get the langauge in C/AL Code in NAV. but i need to know the currently selected language in the addin in c# code. Yeah i could send the code to the addin via string, but it would be a lot nicer to have that info directly.

    Is there any way i can access tha culure/language info from the addin / c# area?
  • vasilis6669vasilis6669 Member Posts: 109
    so you have written an application in c# and used webservices to get the data, and when you get the data, you want to get the data for a specific language?
  • deV.chdeV.ch Member Posts: 543
    I wrote Navision RTC Client-Addins, they get data or send data trough the SourceExpression / ClientAddinTrigger Event , no webservices are used.
    These Addins are Form Elements that include directly in a page object. The Source Application in which these are called is the RTC Client, this was why i thought i could use the c# statement Application.CurrentCulture to get the selected Language of the Client itself. Unfortunatly the Current culture is not changed when changing the rtc client language. i just need the currently used language code (ex. "de-CH")

    And yes i know that i could send the language code to my addin from C/AL Code but it would be nice if it's possible without that.
  • vasilis6669vasilis6669 Member Posts: 109
    Hi,

    I cannot help you further.

    for sure you cannot use c# code in navision code, as you said you can pass the language code to the addin.

    regards,
    vasilis
  • deV.chdeV.ch Member Posts: 543
    I found the correct property to get the selected language in RTC Client!
    Thread.CurrentThread.CurrentUICulture
    

    This gets the selected UICulture in the RTC Client. So there is no need of passing the language code from C/AL to the addin.
  • kinekine Member Posts: 12,562
    Good hint! Thanks. It will be handy sometime... :thumbsup:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,115
    [Changed the attribute of the topic to <Good Posting>]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.