Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dogukan 6 posts 76 karma points
    Jun 22, 2020 @ 11:33
    dogukan
    0

    Culture Change before page load .cshtml

    When I switch between pages, I sometimes need to change the general language(culture) before page load. Is there a function I need or controller?

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Jun 22, 2020 @ 18:52
    Dhanesh Kumar MJ
    0

    Hey dogukan,

    You can achieve by changing Thread culture in System.Threading

  • dogukan 6 posts 76 karma points
    Jun 22, 2020 @ 19:52
    dogukan
    0

    Thank you for your answer, I did what you said but the old culture still came from the dictionary.

  • dogukan 6 posts 76 karma points
    Jun 23, 2020 @ 08:29
    dogukan
    0

    Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("tr-TR");

    the second line had to be added

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Jun 23, 2020 @ 08:45
    Dhanesh Kumar MJ
    0

    Hey

    Solved??

  • dogukan 6 posts 76 karma points
    Jun 23, 2020 @ 08:55
    dogukan
    0

    yeap :) I solved this problem

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Jun 23, 2020 @ 08:57
    Dhanesh Kumar MJ
    0

    Great 👍

Please Sign in or register to post replies

Write your reply to:

Draft