aspnetboilerplate: localization not work when disable one of languages
hi dears,
-
Your Abp package version: 5.1.
-
Your base framework: .Net Framework or .Net Core: .Net Core.
-
Steps needed to reproduce the problem. in class DefaultLanguagesCreator.cs when disable ‘us’ language and add ‘gb’ language, the expected behavior is localization use fallback localization file (default localization file with same culure) but it not shows the localization in site
please note this was working before
private static List<ApplicationLanguage> GetInitialLanguages()
{
var tenantId = MyProjectConsts.MultiTenancyEnabled ? null : (int?)MultiTenancyConsts.DefaultTenantId;
return new List<ApplicationLanguage>
{
new ApplicationLanguage(tenantId, "en", "English", "famfamfam-flags us", true),
new ApplicationLanguage(tenantId, "en-GB", "English", "famfamfam-flags us"),
new ApplicationLanguage(tenantId, "ar-KW", "العربية", "famfamfam-flags kw"),
};
}
to see issue you can download template andmake upper changes
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (15 by maintainers)
@demirmusa I download new template from the site and issue still there
i updated these files like below

but as you can see issue still there
is there something wrong i did in my modifications? is there something i need to add to make localization work?
I think solution maybe to change this part in the code in line 83 of this file (https://github.com/aspnetboilerplate/aspnetboilerplate/pull/5670/commits/d2e552c0825ee635548b2ba4996b5e5c3dda050d#diff-16a7725abffda170921fb5b428593585)
to something like this
@demirmusa first thanks for set issue in milestone second, hope your solution take care of the issue i mentioned and details i put, for summary: i have 2 .xml file
in db there are 4 languages
expected result as mentioned in the issue: when user select language e.g (en-GB) translations come from xml with culture (en) as fallback languages (as mentioned above this behavior was working before)
Thanks again for your time