0
expertit created
Hello,
In aspnet zero, what is the best way to discover which is the current language inside of an entity accessor ?
Thanks,
Albert
3 Answer(s)
-
0
Hi @expertit,
I think it is not a good way but you can use current Thread's culture. I don't know your use case very well but It is better to pass culture string to your entity if possible.
Thanks.
-
0
Hi @ismcagdas
The use case is to support multi-lingual entity properties. The solution is :
- an entity Expert and another entity ExpertLocal
- ExpertLocal is linked with Expert and also with ApplicationLanguage
- ExpertLocal contains the translated properties
- when I access to expert.Name property, I want to get the Name in the current language by accessing experLocals.
Best regards Albert
-
0
Hi @expertit,
Thanks for sharing your solution. As I mentioned above, you can use current thread's culture but I suggest you to search on the web for current solutions on this area if you haven't done this yet.
Thanks.
Have an answer to this question?
Log in
and write your answer.