Hi,
Wouldn't it be better to avoid server-side localization and do it only on a client side? IMO it will lead to a more modern&simple approach for web development and significantly improve speed because now pages will be simple HTMLs.
For instance, in angular, following code: <label>@L("ContactFullName")</label> can be rewritten as: <label>{{L("ContactFullName")}}</label> where L is a function on $rootScope. BTW, redefining L on a nested scope can be used for multi-language websites. And yet another benefit: changing '$rootScope.L' will change all relevant UI and will not cause bugs fixed by page reloading, as it is now.
Please note that I'm talking about best practice and not about removing razor-localization support because for many projects it may not be applicable. In general, I'm thinking about use case when razor&mvc are not used at all (only webapi and core asp.net). This kind of web apps may suffer from some limitations but are significantly easier to maintain, create and port.
-- Bogdan
1 Answer(s)
-
0
Hi,
Thank you so much for your good advice. I aggree with you. I'll change startup template to work with client-side localiztion for AngularJs. I opened an issue to follow it: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-templates/issues/12">https://github.com/aspnetboilerplate/as ... /issues/12</a>