Base solution for your next web application
Open Closed

[LOCALIZATION] multiple localization for same SPA #5424


User avatar
0
daws created

Hello there !

note: this subject is not related to #817@a1b35b3f-8ba1-4fb2-b52e-551e1df08387

<ins>current status</ins> applications

  • main application
  • dasbhoard from abp
  • custom dashboard

localization sources

  • defaultLocalizationSourceName.xml (sample name, which is the main translation file from ABP)
  • App.xml (which add +/- 1000 traductions for my application)
  • other related lolacalization sources from ABP (errors etc)

Code in the application when we can select the localization source to use:

export abstract class AppComponentBase {

    //localizationSourceName = AppConsts.localization.defaultLocalizationSourceName;
    localizationSourceName = 'App';

Question : for each application, i want to use multiple sources without specifing it in each displayed text:

  • AppConsts.localization.defaultLocalizationSourceName
  • 'App'

because I use some translations from abp for common part (user panel, errors etc) and I want to avoid duplicate everything in my 'App' file.

I saw in the doc that by default this is only one source. Do you see any way to use both sources (maybe a little rewrite of localizationService) IF i care about not having duplicate keys in the list of my translation.

thanks for your help ;)


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @daws,

    Do you mean something like this <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1370">https://github.com/aspnetzero/aspnet-ze ... ssues/1370</a> ?