• 欢迎 游客 您的光临,下载之前请先阅读 积分规则 。任何技术问题请在论坛提问,本站定制插件、模板主题。售前、售后问题请联系QQ:5916171
    本站自由发布资源可赚取积分及人民币(可提现)(保证资源真实可用,如被举报封号处理。谨慎分布)。
  • 即日起发表主题、回帖、发布&更新资源、创建&回复私信、发布&回复个人动态均需要验证手机号码,其它不受影响。如不便可进群提问。点击链接加入群聊【XenForo讨论社区】:群号1:143277648

求助 语言

UID
1215
注册
2021/02/14
消息
17
黄金
532G
  • #1
问一下用户组的用户识别文本怎么搞成多语言和论坛版块的标题怎么搞成多语言
 
  • #2
善用自己站后台的搜索短语功能
 
  • #3
善用自己站后台的搜索短语功能
搜过了,之前prefix可以搜到,但是用户识别文本(Banner)和板块的标题(Node),都没有发现,上谷歌搜了发现板块标题没有使用短语,所以压根就搜不到
 
  • #4
在自己想修改的模板对应位置加上
代码:
扩展 折叠 复制
{{ phrase('短语标题') }}

短语自己是能随意增删改的
 
  • #5
在自己想修改的模板对应位置加上
代码:
扩展 折叠 复制
{{ phrase('短语标题') }}

短语自己是能随意增删改的
我不太会诶
代码:
扩展 折叠 复制
<xf:macro name="depth1" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <div class="block block--category block--category{$node.node_id} <xf:if is="$node.isCollapsed_uix()">category--collapsed</xf:if>">
        <span class="u-anchorTarget" id="{$node.Data.getCategoryAnchor()}"></span>
        <xf:if is="property('uix_categoryStripOutsideWrapper')">
            <h2 class="block-header js-nodeMain{{ property('uix_stickyCategoryStrips') ? ' uix_stickyCategoryStrips' : '' }}">
                <xf:if is="property('uix_categoryStripIcons')">
                    <div class="uix_categoryStrip__icon">
                        <i class="uix_icon uix_icon--category"></i>
                    </div>
                </xf:if>
                <div class="uix_categoryStrip-content">
                    <xf:comment><a href="{{ link('categories', $node) }}">{$node.title}</a></xf:comment>
                    <xf:comment><xf:if is="{$node.description}"><div class="block-desc">{$node.description|raw}</div></xf:if></xf:comment>
                    <xf:set var="$uix_categoryDescriptionDisplay" value="{{ property('uix_categoryDescriptionDisplay') }}" />
                    <a href="{{ link('categories', $node) }}" class="uix_categoryTitle" data-xf-init="{{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
                    <xf:if is="$uix_categoryDescriptionDisplay != 'none' && $node.description">
                        <div class="node-description {{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'node-description--tooltip js-nodeDescTooltip' : '' }}">{$node.description|raw}</div>
                    </xf:if>
                </div>
                <xf:if is="{{ property('uix_categoryCollapse') && $xf.visitor->hasPermission('th_uix', 'collapseCategories') }}">
                    <a class="u-ripple categoryCollapse--trigger" rel="nofollow"><xf:fa icon="fa-chevron-up" class=" uix_icon uix_icon--chevron-up" /></a>
                </xf:if>
            </h2>
        </xf:if>
        <div class="block-container">
            <xf:if is="!property('uix_categoryStripOutsideWrapper')">
                <h2 class="block-header js-nodeMain {{ property('uix_stickyCategoryStrips') ? ' uix_stickyCategoryStrips' : '' }}">
                    <xf:if is="property('uix_categoryStripIcons')">
                        <div class="uix_categoryStrip__icon">
                            <i class="uix_icon uix_icon--category"></i>
                        </div>
                    </xf:if>
                    <div class="uix_categoryStrip-content">
                        <xf:comment><a href="{{ link('categories', $node) }}">{$node.title}</a></xf:comment>
                        <xf:comment><xf:if is="{$node.description}"><span class="block-desc">{$node.description|raw}</span></xf:if></xf:comment>
                        <xf:set var="$uix_categoryDescriptionDisplay" value="{{ property('uix_categoryDescriptionDisplay') }}" />
                        <a href="{{ link('categories', $node) }}" class="uix_categoryTitle" data-xf-init="{{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
                        <xf:if is="$uix_categoryDescriptionDisplay != 'none' && $node.description">
                            <div class="node-description {{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'node-description--tooltip js-nodeDescTooltip' : '' }}">{$node.description|raw}</div>
                        </xf:if>
                    </div>
                    <xf:if is="{{ property('uix_categoryCollapse') && $xf.visitor->hasPermission('th_uix', 'collapseCategories') }}">
                        <a class="u-ripple categoryCollapse--trigger" rel="nofollow"><xf:fa icon="fa-chevron-up" class=" uix_icon uix_icon--chevron-up" /></a>
                    </xf:if>
                </h2>
            </xf:if>
            <div class="uix_block-body--outer">
                <div class="block-body">
                    <xf:macro template="forum_list" name="node_list"
                              arg-children="{$children}"
                              arg-extras="{$childExtras}"
                              arg-depth="{{ $depth + 1 }}" />
                </div>
            </div>
        </div>
    </div>
</xf:macro>

<xf:macro name="depth2" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <div class="node below--xl node--id{$node.node_id} node--depth{$depth} node--category {{ $extras.hasNew ? 'node--unread' : 'node--read' }}">
        <div class="node-body">
            <span class="node-icon" aria-hidden="true"><i></i></span>
            <div class="node-main js-nodeMain">
                <xf:set var="$descriptionDisplay" value="{{ property('nodeListDescriptionDisplay') }}" />
                <h3 class="node-title">
                    <a href="{{ link('categories', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
                    <xf:if is="{$extras.hasNew} && property('uix_newNodeMarker')"><span class="uix_newIndicator">{{ phrase('new') }}</span></xf:if>
                </h3>
                <xf:if is="$descriptionDisplay != 'none' && $node.description">
                    <div class="node-description {{ $descriptionDisplay == 'tooltip' ? 'node-description--tooltip js-nodeDescTooltip' : '' }}">{$node.description|raw}</div>
                </xf:if>

                <xf:if is="!property('uix_hideNodeStats')">
                    <div class="node-meta">
                        <xf:if is="!{$extras.privateInfo}">
                            <div class="node-statsMeta">
                                <dl class="pairs pairs--inline">
                                    <xf:if is="property('uix_nodeStatsIcons')">
                                        <dt><xf:fa icon="fa-comment" class=" uix_icon uix_icon--post" /></dt>
                                        <xf:else />
                                        <dt>{{ phrase('threads') }}</dt>
                                    </xf:if>
                                    <dd>{$extras.discussion_count|number_short(1)}</dd>
                                </dl>
                                <dl class="pairs pairs--inline">
                                    <xf:if is="property('uix_nodeStatsIcons')">
                                        <dt><xf:fa icon="fa-comments" class=" uix_icon uix_icon--messages" /></dt>
                                        <xf:else />
                                        <dt>{{ phrase('messages') }}</dt>
                                    </xf:if>
                                    <dd>{$extras.message_count|number_short(1)}</dd>
                                </dl>
                            </div>
                        </xf:if>

                        <xf:if is="$depth == 2 AND property('nodeListSubDisplay') == 'menu'">
                            <xf:macro template="forum_list" name="sub_nodes_menu"
                                      arg-children="{$children}"
                                      arg-childExtras="{$childExtras}"
                                      arg-depth="{{ $depth + 1 }}" />
                        </xf:if>
                    </div>
                </xf:if>

                <xf:if is="$depth == 2 AND property('nodeListSubDisplay') == 'flat'">
                    <xf:macro template="forum_list" name="sub_nodes_flat"
                              arg-children="{$children}"
                              arg-childExtras="{$childExtras}"
                              arg-depth="{{ $depth + 1 }}" />
                </xf:if>
            </div>

            <xf:if is="!{$extras.privateInfo} && !property('uix_hideNodeStats')">
                <div class="node-stats">
                    <dl class="pairs pairs--rows">
                        <dd>{$extras.discussion_count|number_short(1)}</dd>
                        <dt>{{ phrase('threads') }}</dt>
                    </dl>
                    <dl class="pairs pairs--rows">
                        <dd>{$extras.message_count|number_short(1)}</dd>
                        <dt>{{ phrase('messages') }}</dt>
                    </dl>
                </div>
            </xf:if>

            <xf:if is="!property('uix_hideNodeLastPost')">
                <div class="node-extra">
                    <xf:if is="{$extras.privateInfo}">
                        <span class="node-extra-placeholder">{{ phrase('private') }}</span>
                        <xf:elseif is="{$extras.LastThread}" />
                        <div class="node-extra-icon">
                            <xf:if is="$xf.visitor.isIgnoring($extras.last_post_user_id)">
                                <xf:avatar user="{{ null }}" size="xs" />
                                <xf:else />
                                <xf:avatar user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" size="xs" />
                            </xf:if>
                        </div>
                        <div class="uix_nodeExtra__rows">
                            <div class="node-extra-row">
                                <xf:if is="$extras.LastThread.isUnread()">
                                    <a href="{{ link('threads/unread', $extras.LastThread) }}" class="node-extra-title" title="{$extras.LastThread.title}">{{ prefix('thread', $extras.LastThread) }}{$extras.LastThread.title}</a>
                                    <xf:else />
                                    <a href="{{ link('threads/post', $extras.LastThread, {'post_id': $extras.last_post_id}) }}" class="node-extra-title" title="{$extras.LastThread.title}">{{ prefix('thread', $extras.LastThread) }}{$extras.LastThread.title}</a>
                                </xf:if>
                            </div>
                            <div class="node-extra-row">
                                <ul class="listInline listInline--bullet">
                                    <li class="node-extra-date"><xf:date time="{$extras.last_post_date}" /></li>
                                    <xf:if is="$xf.visitor.isIgnoring($extras.last_post_user_id)">
                                        <li class="node-extra-user">{{ phrase('ignored_member') }}</li>
                                        <xf:else />
                                        <li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" /></li>
                                    </xf:if>
                                </ul>
                            </div>
                        </div>
                        <xf:else />
                        <span class="node-extra-placeholder">{{ phrase('none') }}</span>
                    </xf:if>
                </div>
            </xf:if>
        </div>
    </div>
</xf:macro>

<xf:macro name="depthN" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <li>
        <a href="{{ link('categories', $node) }}" class="subNodeLink subNodeLink--category {{ $extras.hasNew ? 'subNodeLink--unread' : '' }}">{$node.title}</a>
        <xf:macro template="forum_list" name="sub_node_list"
                  arg-children="{$children}"
                  arg-childExtras="{$childExtras}"
                  arg-depth="{{ $depth + 1 }}" />
    </li>
</xf:macro>

请问一下在这里的话如果我要把这里给加上短语的要怎么加啊,我不太会语法
 
  • #6
我不太会诶
代码:
扩展 折叠 复制
<xf:macro name="depth1" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <div class="block block--category block--category{$node.node_id} <xf:if is="$node.isCollapsed_uix()">category--collapsed</xf:if>">
        <span class="u-anchorTarget" id="{$node.Data.getCategoryAnchor()}"></span>
        <xf:if is="property('uix_categoryStripOutsideWrapper')">
            <h2 class="block-header js-nodeMain{{ property('uix_stickyCategoryStrips') ? ' uix_stickyCategoryStrips' : '' }}">
                <xf:if is="property('uix_categoryStripIcons')">
                    <div class="uix_categoryStrip__icon">
                        <i class="uix_icon uix_icon--category"></i>
                    </div>
                </xf:if>
                <div class="uix_categoryStrip-content">
                    <xf:comment><a href="{{ link('categories', $node) }}">{$node.title}</a></xf:comment>
                    <xf:comment><xf:if is="{$node.description}"><div class="block-desc">{$node.description|raw}</div></xf:if></xf:comment>
                    <xf:set var="$uix_categoryDescriptionDisplay" value="{{ property('uix_categoryDescriptionDisplay') }}" />
                    <a href="{{ link('categories', $node) }}" class="uix_categoryTitle" data-xf-init="{{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
                    <xf:if is="$uix_categoryDescriptionDisplay != 'none' && $node.description">
                        <div class="node-description {{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'node-description--tooltip js-nodeDescTooltip' : '' }}">{$node.description|raw}</div>
                    </xf:if>
                </div>
                <xf:if is="{{ property('uix_categoryCollapse') && $xf.visitor->hasPermission('th_uix', 'collapseCategories') }}">
                    <a class="u-ripple categoryCollapse--trigger" rel="nofollow"><xf:fa icon="fa-chevron-up" class=" uix_icon uix_icon--chevron-up" /></a>
                </xf:if>
            </h2>
        </xf:if>
        <div class="block-container">
            <xf:if is="!property('uix_categoryStripOutsideWrapper')">
                <h2 class="block-header js-nodeMain {{ property('uix_stickyCategoryStrips') ? ' uix_stickyCategoryStrips' : '' }}">
                    <xf:if is="property('uix_categoryStripIcons')">
                        <div class="uix_categoryStrip__icon">
                            <i class="uix_icon uix_icon--category"></i>
                        </div>
                    </xf:if>
                    <div class="uix_categoryStrip-content">
                        <xf:comment><a href="{{ link('categories', $node) }}">{$node.title}</a></xf:comment>
                        <xf:comment><xf:if is="{$node.description}"><span class="block-desc">{$node.description|raw}</span></xf:if></xf:comment>
                        <xf:set var="$uix_categoryDescriptionDisplay" value="{{ property('uix_categoryDescriptionDisplay') }}" />
                        <a href="{{ link('categories', $node) }}" class="uix_categoryTitle" data-xf-init="{{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
                        <xf:if is="$uix_categoryDescriptionDisplay != 'none' && $node.description">
                            <div class="node-description {{ $uix_categoryDescriptionDisplay == 'tooltip' ? 'node-description--tooltip js-nodeDescTooltip' : '' }}">{$node.description|raw}</div>
                        </xf:if>
                    </div>
                    <xf:if is="{{ property('uix_categoryCollapse') && $xf.visitor->hasPermission('th_uix', 'collapseCategories') }}">
                        <a class="u-ripple categoryCollapse--trigger" rel="nofollow"><xf:fa icon="fa-chevron-up" class=" uix_icon uix_icon--chevron-up" /></a>
                    </xf:if>
                </h2>
            </xf:if>
            <div class="uix_block-body--outer">
                <div class="block-body">
                    <xf:macro template="forum_list" name="node_list"
                              arg-children="{$children}"
                              arg-extras="{$childExtras}"
                              arg-depth="{{ $depth + 1 }}" />
                </div>
            </div>
        </div>
    </div>
</xf:macro>

<xf:macro name="depth2" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <div class="node below--xl node--id{$node.node_id} node--depth{$depth} node--category {{ $extras.hasNew ? 'node--unread' : 'node--read' }}">
        <div class="node-body">
            <span class="node-icon" aria-hidden="true"><i></i></span>
            <div class="node-main js-nodeMain">
                <xf:set var="$descriptionDisplay" value="{{ property('nodeListDescriptionDisplay') }}" />
                <h3 class="node-title">
                    <a href="{{ link('categories', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
                    <xf:if is="{$extras.hasNew} && property('uix_newNodeMarker')"><span class="uix_newIndicator">{{ phrase('new') }}</span></xf:if>
                </h3>
                <xf:if is="$descriptionDisplay != 'none' && $node.description">
                    <div class="node-description {{ $descriptionDisplay == 'tooltip' ? 'node-description--tooltip js-nodeDescTooltip' : '' }}">{$node.description|raw}</div>
                </xf:if>

                <xf:if is="!property('uix_hideNodeStats')">
                    <div class="node-meta">
                        <xf:if is="!{$extras.privateInfo}">
                            <div class="node-statsMeta">
                                <dl class="pairs pairs--inline">
                                    <xf:if is="property('uix_nodeStatsIcons')">
                                        <dt><xf:fa icon="fa-comment" class=" uix_icon uix_icon--post" /></dt>
                                        <xf:else />
                                        <dt>{{ phrase('threads') }}</dt>
                                    </xf:if>
                                    <dd>{$extras.discussion_count|number_short(1)}</dd>
                                </dl>
                                <dl class="pairs pairs--inline">
                                    <xf:if is="property('uix_nodeStatsIcons')">
                                        <dt><xf:fa icon="fa-comments" class=" uix_icon uix_icon--messages" /></dt>
                                        <xf:else />
                                        <dt>{{ phrase('messages') }}</dt>
                                    </xf:if>
                                    <dd>{$extras.message_count|number_short(1)}</dd>
                                </dl>
                            </div>
                        </xf:if>

                        <xf:if is="$depth == 2 AND property('nodeListSubDisplay') == 'menu'">
                            <xf:macro template="forum_list" name="sub_nodes_menu"
                                      arg-children="{$children}"
                                      arg-childExtras="{$childExtras}"
                                      arg-depth="{{ $depth + 1 }}" />
                        </xf:if>
                    </div>
                </xf:if>

                <xf:if is="$depth == 2 AND property('nodeListSubDisplay') == 'flat'">
                    <xf:macro template="forum_list" name="sub_nodes_flat"
                              arg-children="{$children}"
                              arg-childExtras="{$childExtras}"
                              arg-depth="{{ $depth + 1 }}" />
                </xf:if>
            </div>

            <xf:if is="!{$extras.privateInfo} && !property('uix_hideNodeStats')">
                <div class="node-stats">
                    <dl class="pairs pairs--rows">
                        <dd>{$extras.discussion_count|number_short(1)}</dd>
                        <dt>{{ phrase('threads') }}</dt>
                    </dl>
                    <dl class="pairs pairs--rows">
                        <dd>{$extras.message_count|number_short(1)}</dd>
                        <dt>{{ phrase('messages') }}</dt>
                    </dl>
                </div>
            </xf:if>

            <xf:if is="!property('uix_hideNodeLastPost')">
                <div class="node-extra">
                    <xf:if is="{$extras.privateInfo}">
                        <span class="node-extra-placeholder">{{ phrase('private') }}</span>
                        <xf:elseif is="{$extras.LastThread}" />
                        <div class="node-extra-icon">
                            <xf:if is="$xf.visitor.isIgnoring($extras.last_post_user_id)">
                                <xf:avatar user="{{ null }}" size="xs" />
                                <xf:else />
                                <xf:avatar user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" size="xs" />
                            </xf:if>
                        </div>
                        <div class="uix_nodeExtra__rows">
                            <div class="node-extra-row">
                                <xf:if is="$extras.LastThread.isUnread()">
                                    <a href="{{ link('threads/unread', $extras.LastThread) }}" class="node-extra-title" title="{$extras.LastThread.title}">{{ prefix('thread', $extras.LastThread) }}{$extras.LastThread.title}</a>
                                    <xf:else />
                                    <a href="{{ link('threads/post', $extras.LastThread, {'post_id': $extras.last_post_id}) }}" class="node-extra-title" title="{$extras.LastThread.title}">{{ prefix('thread', $extras.LastThread) }}{$extras.LastThread.title}</a>
                                </xf:if>
                            </div>
                            <div class="node-extra-row">
                                <ul class="listInline listInline--bullet">
                                    <li class="node-extra-date"><xf:date time="{$extras.last_post_date}" /></li>
                                    <xf:if is="$xf.visitor.isIgnoring($extras.last_post_user_id)">
                                        <li class="node-extra-user">{{ phrase('ignored_member') }}</li>
                                        <xf:else />
                                        <li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" /></li>
                                    </xf:if>
                                </ul>
                            </div>
                        </div>
                        <xf:else />
                        <span class="node-extra-placeholder">{{ phrase('none') }}</span>
                    </xf:if>
                </div>
            </xf:if>
        </div>
    </div>
</xf:macro>

<xf:macro name="depthN" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <li>
        <a href="{{ link('categories', $node) }}" class="subNodeLink subNodeLink--category {{ $extras.hasNew ? 'subNodeLink--unread' : '' }}">{$node.title}</a>
        <xf:macro template="forum_list" name="sub_node_list"
                  arg-children="{$children}"
                  arg-childExtras="{$childExtras}"
                  arg-depth="{{ $depth + 1 }}" />
    </li>
</xf:macro>

请问一下在这里的话如果我要把这里给加上短语的要怎么加啊,我不太会语法
你也没说加的位置啊

在网站上方公告的群号里私聊我
 
最后编辑:
后退
顶部 底部