feat(core): use environment defaultResourceName as fallback for localization - Issue 24402#24589
Merged
oykuermann merged 2 commits intodevfrom Jan 15, 2026
Merged
feat(core): use environment defaultResourceName as fallback for localization - Issue 24402#24589oykuermann merged 2 commits intodevfrom
oykuermann merged 2 commits intodevfrom
Conversation
Updates ConfigStateService to set the defaultResourceName for localization from the environment configuration if it is not already set in the app state. This ensures that the localization resource name is consistently initialized from environment settings when available.
Updated the explanation for how defaultResourceName is determined, specifying that it is first retrieved from the backend API response and falls back to the value in environment.ts if not provided.
sumeyyeKurtulus
approved these changes
Jan 14, 2026
oykuermann
approved these changes
Jan 15, 2026
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.

Description
Resolves #24402 (write the related issue number if available)
Changes
EnvironmentServicedependency and implemented fallback logic fordefaultResourceNamegetLocalizationAndCombineWithAppState: Uses environment value when API response doesn't providedefaultResourceNamerefreshLocalization: Same fallback logic applied for consistencyBehavior
environment.tsExample
// environment.ts
export const environment = {
localization: {
defaultResourceName: 'MyProjectName',
},
} as Environment;
Checklist
How to test it?
Remove the
[LocalizationResourceName("MyProjectName")]attribute from:abp\templates\app\aspnet-core\src\MyCompanyName.MyProjectName.Domain.Shared\Localization\MyProjectNameResource.csRun the DbMigrator:
cd
abp\templates\app\aspnet-core\src\MyCompanyName.MyProjectName.DbMigratordotnet runEnsure
environment.tshasdefaultResourceNameconfigured:localization: { defaultResourceName: 'MyProjectName', },Start the Angular dev-app:
cd
abp\npm\ng-packs yarn startVerify that {{ '::Welcome' | abpLocalization }} correctly resolves using the environment fallback.
Expected: Localization keys with :: prefix should resolve to the resource name defined in environment.ts when the backend doesn't provide defaultResourceName.