Victoire/localeswitcher-widget

此包已被弃用且不再维护。未建议替换包。

Victoire LocaleSwitcher 小部件

安装: 170

依赖: 0

建议者: 0

安全: 0

星星: 3

关注者: 15

分支: 4

公开问题: 2

类型:symfony-bundle

2.0.2 2017-03-31 13:00 UTC

This package is auto-updated.

Last update: 2021-12-21 22:52:22 UTC


README

CircleCI

Victoire LocaleSwitcher Bundle

此包的用途是什么

此包提供对 LocaleSwitcher Widget 的访问,该小部件可以在您的网站上启用语言切换功能。

设置Victoire

如果您尚未设置,可以按照以下步骤设置Victoire 这里

安装包

php composer.phar require victoire/localeswitcher-bundle

不要忘记在AppKernel中添加包!

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Victoire\Widget\LocaleSwitcherBundle\VictoireWidgetLocaleSwitcherBundle(),
        );

        return $bundles;
    }
}

在语言切换器中添加一些额外的本地化链接

有时,例如对于一家大型公司,其子公司不由该网站管理,我们希望在语言切换器中添加额外的本地化链接。

只需添加一些配置即可完成操作

#config.yml
victoire_widget_locale_switcher:
    extraLocalizedLinks:
        jp: http://google.jp/
        us: https://google.us/
        ca: https://google.ca/
        pl: http://google.pl/
        ...

您可以在 Resources/public/images/flags 中查看管理的国家完整列表。