New Admin menu resource issue

1 个月 前
Hi All,

I recently started playing with Nop 4.3, and I must admit, I'm impressed. I'm an Umbraco specialist and my first thought was to see if I could create an Umbraco-like plugin to make the site more diverse in terms on content using Umbraco's framework architecture.
So I started with the Sitemap.config and added some dummy nodes as a starting point...

    <siteMapNode SystemName="Umbraco" nopResource="Admin.Umbraco" PermissionNames="ManageTopics" IconClass="fa-bars">
      <siteMapNode SystemName="UmbracoContent" nopResource="Admin.Umbraco.Content" IconClass="fa-language" />
      <siteMapNode SystemName="UmbracoMedia" nopResource="Admin.Umbraco.Media" IconClass="fa-image" />
      <siteMapNode SystemName="UmbracoSettings" nopResource="Admin.Umbraco.Settings" IconClass="fa-cogs">
        <siteMapNode SystemName="UmbracoSettingsDocTypes" nopResource="Admin.Umbraco.Settings.DocTypes" IconClass="fa-folder" />
        <siteMapNode SystemName="UmbracoSettingsDataTypes" nopResource="Admin.Umbraco.Settings.DataTypes" IconClass="fa-folder" />
        <siteMapNode SystemName="UmbracoSettingsLanguages" nopResource="Admin.Umbraco.Settings.Languages" IconClass="fa-globe" />
      <siteMapNode SystemName="UmbracoUsers" nopResource="Admin.Umbraco.Users" IconClass="fa-users" />
      <siteMapNode SystemName="UmbracoMembers" nopResource="Admin.Umbraco.Members" IconClass="fa-user-circle" />

Then I added the resource values in the defaultResources.nopres.xml file....

  <LocaleResource Name="Admin.Umbraco">
    <Value>Umbraco Plugin</Value>
  <LocaleResource Name="Admin.Umbraco.Content">
  <LocaleResource Name="Admin.Umbraco.Media">
  <LocaleResource Name="Admin.Umbraco.Settings">
  <LocaleResource Name="Admin.Umbraco.Settings.DocTypes">
    <Value>Document Types</Value>
  <LocaleResource Name="Admin.Umbraco.Settings.DataTypes">
    <Value>Data Types</Value>
  <LocaleResource Name="Admin.Umbraco.Settings.Languages">
  <LocaleResource Name="Admin.Umbraco.Users">
  <LocaleResource Name="Admin.Umbraco.Members">

But it seems the resource framework is not picking up and displaying the correct values, just the resource name (in lowercase) e.g. admin.umbraco.... admin.umbraco.content etc  

What am I missing?
1 个月 前
I don’t know what the defaultResources.nopres.xml file is or where it comes from ?
Local Resources are not something that gets automatically installed

Local Resources need to be defined for a Language
For example if you take a look at one of the language packs

These are imported on the Configure Language Edit page

So for your strings you can either define them manually one at a time on the this page via "Add new record" or create an import file like one of the language packs

Depending on how you load them sometimes you need to clear the Cache to get the new strings to update
1 个月 前
Hello louisferreira
Are you added  resource values in resource file before nopCommerce installed?
nopCommerce install time takes resource values from resource file.
After installed nopCommerce you have to manually add string and its value in language.
Also you do with import resource file.

1) Go to Admin → Configuration → Languages.
2) Edit English name language.
3) Click Import resources.
4) Upload your resource file.
1 个月 前
Thanks both, that was exactly what I was looking for. I added the resource strings in the Admin Languages section, and it updated the menu as expected. Thank you!