首页 > 解决方案 > fr.json (i18n) 不与法语页面交互?

问题描述

当用户点击法语页面时。显示总是英文的。用户看到My Homepage而不是Page d'accueil.

在此处输入图像描述

我不明白问题出在哪里?

在我的navigation.service.ts中,我有这个:

defaultMenu: IMenuItem[] = [
    {   
     name: 'My Project', idI18N: '2491',
     description: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.',
     type: 'dropDown',
     icon: 'i-University',
     sub: [
            { icon: 'i-', idI18N: '2491', name: 'My Homepage', state: '/dashboard/homepage', type: 'link', onlyAgents: false, onlyTRX: false },
            { icon: 'i-', idI18N: '2492', name: 'Customers for a stock', state: '/dashboard/stocksClients', type: 'link', onlyAgents: true, onlyTRX: false },                   
            ...
           
        ]
    },

也许,问题就在这里?

{ icon: 'i-', idI18N: '2491', name: 'My Homepage', state: '/dashboard/homepage', type: 'link', onlyAgents: false, onlyTRX: false },

我认为我必须改变name: 'My Homepage'??

然后,在我的admin-layout-sidebar-compact.component.html中,我有这个

 <div id="breadcrumb">
         <div class="wrapper">
             <ul style="padding-left: 0px;">
                  <li class="first">{{mainSection}} /</li>
                  <li>
                   <a href="javascript:void(0)" title="{{subSection}}"><!-- sectionTitle --> - {{subSection}}</a>
                  </li>
                        
              </ul>
         </div>
    </div>

在我的fr.json中,我有这个:

...
"2491":"Page d'accueil",
...

例如,如果我将 fr.json 更改Page d'auccueilMa page,则没有任何变化。我总是有My HomePage

我的印象是fr.json不交互?

如果你有任何想法我很感兴趣。提前感谢您的帮助和时间。

标签: jsonangulartypescript

解决方案


推荐阅读