Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Multilingual data support in framework #252


User avatar
0
neeraj k created

Hi All

Right now, asp.net boilerplate framework supports localization for resources which is working well in system. I have to work on a site which is completely multilingual along with the data entered in the system. So, to do this, I have followed an article on codeproject

<a class="postlink" href="http://www.codeproject.com/Tips/369845/Localization-with-Entity-Framework">http://www.codeproject.com/Tips/369845/ ... -Framework</a>

Now the issue I am facing is, because framework automatically saves changes at the end of the request, it also updates my tables. Basically, somehow i need to avoid the automatic update. One way is to modify the framework and remove the code which is saving changes at end of request and calling savechanges manually. Is there any other way ?

Thanks in advance for any help.


5 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    You can add [UnitOfWork(IsDisabled=true)] to your app services but it may not be pratical if there are too many places. I'll check the article. Thanks. We also such a need, maybe we can add such a mechanism to the ABP.

  • User Avatar
    0
    neeraj k created

    Hi

    For the time being, I have a workaround to this issue. As per the article, the default language is stored in main table and other languages are stored in translation table. But I put default language too in translation table and not using the main table fields anywhere in the app to display.

    I have to put all languages entry in translation table. It has solved the problem for the time being. The extra updates are happening but it does not affect the working.

    So, as per my idea, we can add some fields in entity having notmapped option on and thus those will never gets updated in database because those will not be there in tables. I did not try that because of time limitations, but will check in some days.

    Thanks Neeraj

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    For one of my project needs, I will implement in in near future. I'm thinking and trying some models. One of them is <a class="postlink" href="https://github.com/hikalkan/experimental-multi-lingual-entities">https://github.com/hikalkan/experimenta ... l-entities</a>

    You can check it. For example, there is a Product entity (which contans language-independent properties) and ProductTranslation entity (which contains language-specific properties). Product has many translations. When I decide the exact model, I'll implement it in the ABP.

    Thanks.

  • User Avatar
    0
    rashed created

    Hi,

    I think you are talking about "Content Localization".

    when I was working with Dotnetnuke it was not easy to find DNN modules that support ML (Multi Language) content, but was there some interesting efforts on codeplex , may you can take a look , it's close to Halil model. <a class="postlink" href="http://nuntiocontent.codeplex.com/">http://nuntiocontent.codeplex.com/</a>

    also I think content localization is now officially supported in all DNN modules (also this may give more ideas) <a class="postlink" href="http://www.dnnsoftware.com/community-blog/cid/155042/content-localization-walkthrough">http://www.dnnsoftware.com/community-bl ... alkthrough</a>

    for Lookups or Lists they have a different approach using resources , but it's working :roll: <a class="postlink" href="http://www.dnnsoftware.com/community-blog/cid/155072/new-list-localization-in-dnn-733">http://www.dnnsoftware.com/community-bl ... in-dnn-733</a>

  • User Avatar
    0
    hikalkan created
    Support Team

    Thank you so much for the informations. I'll check them.

    Since this is a feature request, please continue with this issue: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/297">https://github.com/aspnetboilerplate/as ... issues/297</a>

    Thanks.