Hi Support
I am using ABP 4.4.3 and all are working fine but I want to translate the administration menu on language selection. I have done with all menus except the administration menu so could you please suggest to me how can I translate this.
It's very urgent for me so please respond to this asap.
Thanks,
- ABP Framework version: v4.4.3
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
18 Answer(s)
-
0
Hi @safi
I answered this question at https://support.abp.io/QA/Questions/2413/Changing-the-name-of-Administration-menu-item#answer-c47fcd18-b187-5cae-4a43-3a0160d834cf
-
0
Hi @safi
I answered this question at https://support.abp.io/QA/Questions/2413/Changing-the-name-of-Administration-menu-item#answer-c47fcd18-b187-5cae-4a43-3a0160d834cf
Ok, thanks. If there is anything that we can add in the JSON file (present in the localization folder) for this?
-
0
If there is anything that we can add in the JSON file (present in the localization folder) for this?
You won't change anything in your current localization files. You need to create another localization folder and configure it to extend the resource you want to change.
See
Extending Existing Resource
section in the documentation.In your scenario, you need to extend
AbpUiNavigationResource
.Localization key for administration menu is
Menu:Administration
.example code:
services.Configure<AbpLocalizationOptions>(options => { options.Resources .Get<AbpUiNavigationResource>() .AddVirtualJson("/Localization/Resources/Test/Extensions"); });
/Localization/Resources/Test/Extensions/en.json
file:{ "culture": "en", "texts": { "Menu:Administration": "Custom administration translate" } }
-
0
services.Configure<AbpLocalizationOptions>(options => { options.Resources .Get<AbpUiNavigationResource>() .AddVirtualJson("/Localization/Resources/Test/Extensions"); });
Where I need to add this code?
-
0
If there is anything that we can add in the JSON file (present in the localization folder) for this?
You won't change anything in your current localization files. You need to create another localization folder and configure it to extend the resource you want to change.
See
Extending Existing Resource
section in the documentation.In your scenario, you need to extend
AbpUiNavigationResource
.Localization key for administration menu is
Menu:Administration
.example code:
services.Configure<AbpLocalizationOptions>(options => { options.Resources .Get<AbpUiNavigationResource>() .AddVirtualJson("/Localization/Resources/Test/Extensions"); });
/Localization/Resources/Test/Extensions/en.json
file:{ "culture": "en", "texts": { "Menu:Administration": "Custom administration translate" } }
Hi
Thanks for the response. I tried your solution so it's reflecting my files in Language text section (under administration) but not changing text in registration form. I added keys there but not showing changes there.
-
0
It's quite urgent so expecting early response.
-
0
Hi @safi,
You overrided
AbpUiNavigationResource
localizations, and registration form localizations don't belong to that resource. So you need to overrideAbpAccountResource
as well. -
0
Hi @safi,
You overrided
AbpUiNavigationResource
localizations, and registration form localizations don't belong to that resource. So you need to overrideAbpAccountResource
as well.Hi
If I am trying to add AbpAccountResource then it's showing error
Please let me know what reference I need to add for this. Same error is coming If I use AbpUiNavigationResource.
-
0
Namespace for AbpAccountResource is
Volo.Abp.Account.Localization
, andVolo.Abp.UI.Navigation.Localization.Resource
for AbpUiNavigationResource.using Volo.Abp.Account.Localization;
using Volo.Abp.UI.Navigation.Localization.Resource;
However, make sure that you are overriding these resources in a project/layer that references
Volo.Abp.Account.Pro.Shared.Application.Contracts
package. I suggest you to make these changes in the top layer (i guess HttpApi.Host for blazor) of your solution. -
0
Namespace for AbpAccountResource is
Volo.Abp.Account.Localization
, andVolo.Abp.UI.Navigation.Localization.Resource
for AbpUiNavigationResource.using Volo.Abp.Account.Localization;
using Volo.Abp.UI.Navigation.Localization.Resource;
However, make sure that you are overriding these resources in a project/layer that references
Volo.Abp.Account.Pro.Shared.Application.Contracts
package. I suggest you to make these changes in the top layer (i guess HttpApi.Host for blazor) of your solution.Ok thanks, yekalkan. Let me try this solution.
-
0
Namespace for AbpAccountResource is
Volo.Abp.Account.Localization
, andVolo.Abp.UI.Navigation.Localization.Resource
for AbpUiNavigationResource.using Volo.Abp.Account.Localization;
using Volo.Abp.UI.Navigation.Localization.Resource;
However, make sure that you are overriding these resources in a project/layer that references
Volo.Abp.Account.Pro.Shared.Application.Contracts
package. I suggest you to make these changes in the top layer (i guess HttpApi.Host for blazor) of your solution.Ok thanks, yekalkan. Let me try this solution.
I added these folders into host project and trying like this but still getting error while using AbpAccountResource
-
0
What does the error say?
-
0
-
0
There is a typo in the screenshot (
AbpAccountrResource
instead ofAbpAccountResource
). Does the error persist when you fix it? -
0
-
0
Can you try
AccountResource
instead ofAbpAccountResource
? -
0
AccountResource
Hi
Yes, the account resource is working but it's not taking keys from my resource file. I added a localization folder under the host project and added a test folder into it in which I have added a de-DE.json file and calling like this only.
Can we connect on zoom to check this? I already spent enough time on this and it's very urgent for me.
-
0
You can send your project to support@abp.io