abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.72k stars 3.4k forks source link

Implementing multi-lingual entities #11698

Open ebicoglu opened 2 years ago

ebicoglu commented 2 years ago

We have started to implement this feature in the past, but it was canceled due to some design problems. This issue is for getting ideas from the community and tracking the progress of the this feature. The previous related conversation is at #1754

This feature exists in ASP.NET Boilerplate and if you don't want to wait and implement it on your own, check out the ASP.NET Boilerplate implementation

rashedjawda commented 2 years ago

Thank you, that's good news. We already implement it in our solutions the same way implemented in aspnetboilerplate, I hope the migration go smoth :)

julian-forster commented 2 years ago

@ebicoglu can you please explain the key design problems, so that we can give you feedback and maybe some ideas for possible solutions?

angel-sotabytes commented 1 year ago

Any new about the progress? I want to buy the abp commercial but this feature is a must for my purpose.

ahmednfwela commented 1 year ago

I have done some progress on this in these 2 PRs

https://github.com/abpframework/abp/pull/13384 https://github.com/abpframework/abp/pull/14837

and according to this test, there is no need to use sync over async at all!

https://github.com/abpframework/abp/blob/8ca3e790327ed753aead432f876d983dc1d683f4/framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectManager_Tests.cs#L137-L155

and this is the mapping profile that makes this possible:

https://github.com/abpframework/abp/blob/8ca3e790327ed753aead432f876d983dc1d683f4/framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectTestProfile.cs#L8-L23

it uses automapper's ability to pass parameters during the mapping process, see official docs

It would be easier if Abp had this by default, so that we don't have to go through automapper https://github.com/abpframework/abp/issues/14834 but it was discarded as an unnecessary feature