Add Language controller to Grand.Web.Store (SaaS per-store language management)#700
Merged
Merged
Conversation
…LanguageId to LanguageSettings Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/b443e663-c52e-4312-b91f-5e4b3151b411 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
KrzysztofPajak
May 24, 2026 16:59
View session
Eliminated the `PrimaryStoreLanguageId` property and its usage across the codebase, including `LanguageSettings`, `InstallationService`, `LanguageController`, and UI templates. Simplified language handling by removing related validations and UI elements.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a store-area (SaaS) Language management surface in Grand.Web.Store, modeled after the existing per-store Currency management flow, enabling store managers to assign/unassign per-store languages and manage the store default language via a Kendo grid UI.
Changes:
- Introduces
StoreLanguageModeland a newLanguageControllerwith list + assign/unassign + set/unset default endpoints. - Adds a new store-area Language list view (
Areas/Store/Views/Language/List.cshtml) with Kendo grid actions. - Updates the store-area Currency list view to remove the Published column.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Web/Grand.Web.Store/Models/StoreLanguageModel.cs | Adds a view model for representing languages in the store-manager grid. |
| src/Web/Grand.Web.Store/Controllers/LanguageController.cs | Adds store-manager endpoints for listing languages and managing store assignment/default language. |
| src/Web/Grand.Web.Store/Areas/Store/Views/Language/List.cshtml | Adds the Kendo UI grid for per-store language assignment and default language management. |
| src/Web/Grand.Web.Store/Areas/Store/Views/Currency/List.cshtml | Removes the Published column from the currencies grid. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replaced `Grand.Domain.Localization` with `Grand.Business.Core.Interfaces.Common.Localization`. Removed `LanguageSettings` from the constructor. Updated `CurrentStoreId` to use `contextAccessor.WorkContext.CurrentCustomer.StaffStoreId`.
…blished in grid Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/4e6c7dd0-22a1-407e-b725-feb4acd8d321 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Removed `AdminAreaSettings` injection and grid pagination settings from `List.cshtml`. Updated `LanguageController` to exclude hidden languages by setting `showHidden` to `false` in `GetAllLanguages`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a Language management controller in
Grand.Web.Storefor the SaaS scenario, mirroring the existing Currency controller pattern introduced in PR #698.Store owners can:
LimitedToStores = truelanguages)LimitedToStores = truelanguages, not the primary language, not the store's default)Store owners cannot:
LimitedToStores = false)LanguageSettings.PrimaryStoreLanguageId)Changes
src/Web/Grand.Web.Store/Models/StoreLanguageModel.csId,Name,LanguageCulture,FlagImageFileName,Published,DisplayOrder,LimitedToStores,IsAssignedToCurrentStore,IsPrimaryStoreLanguage,IsDefaultStoreLanguage,CanManagesrc/Web/Grand.Web.Store/Controllers/LanguageController.cs[PermissionAuthorize(PermissionSystemName.Languages)]Index→ redirect,List,ListData(POST),AssignStore(POST),UnassignStore(POST),SetDefaultLanguage(POST),UnsetDefaultLanguage(POST)src/Web/Grand.Web.Store/Areas/Store/Views/Language/List.cshtmlsrc/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xmlassignstore,unassignstore,setdefaultlanguage,unsetdefaultlanguage,fields.isprimarystorelanguage,notfound,cannotmodifyglobal,cantdeleteprimary,cantunassigndefault,notpublished,notassignedtostore,notdefaultlanguagenotfound,cannotmodifyglobal,cantunassigndefault,notpublishednotfound