How does localization work in mixcore? #683
-
I'm confused, I've added languages and words, but how can I translate them? |
Beta Was this translation helpful? Give feedback.
Answered by
truongtphat
Aug 28, 2023
Replies: 2 comments
-
@truongtphat will help to provide you an instruction soon. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @teocto, For page: yourdomain/specificulture/abc @inject MixCmsContext context
@inject MixCacheService cacheService
@inject IMixCmsService cmsService
@{
var culture = ViewData["culture"] as string;
var postRepo = PostContentViewModel.GetRootRepository(context, cacheService);
var posts = await postRepo.GetPagingAsync(m => m.MixTenantId == cmsService.GetCurrentTenant().Id && m.Specificulture == culture, new PagingModel()
{
SortBy = "CreatedDateTime",
SortDirection = SortDirection.Desc,
PageSize = 3,
PageIndex = 0
});
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Smilefounder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @teocto,
For page: yourdomain/specificulture/abc
For post: you can use this code to get posts by specificulture on razor file