PHPackages                             blackbird/hreflang-tag - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. blackbird/hreflang-tag

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

blackbird/hreflang-tag
======================

1.0.5(2y ago)25.7k↑113.3%1OSL-3.0PHP

Since Feb 7Pushed 2y ago2 watchersCompare

[ Source](https://github.com/blackbird-agency/hreflang-tag)[ Packagist](https://packagist.org/packages/blackbird/hreflang-tag)[ RSS](/packages/blackbird-hreflang-tag/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Installation
============

[](#installation)

- Fill out all configurations within Store -&gt; System Configuration -&gt; Blackbird Extensions -&gt; Href Lang
- Be careful, some config are only available by Store View

[![system_config_screenshot.png](system_config_screenshot.png)](system_config_screenshot.png)

### Enable Href Lang Block

[](#enable-href-lang-block)

Enable block to be injected in layout

### Show Only Store From Same Website

[](#show-only-store-from-same-website)

Define if all store views are displayed within hreflang tags or only storeview with same website than current crawled website.

### Replace Native Store Switcher Url

[](#replace-native-store-switcher-url)

Native Store Switcher block will use URL from hreflang system instead of ugly default Magento URL Better for SEO. Fallback on default system if no URL are available through Hreflang system

### Remove "\_\_\_store" Parameter from Url

[](#remove-___store-parameter-from-url)

In case you have \_\_\_store in URL key, remove it

### Default locale

[](#default-locale)

Define which locale is the default one. Based on what you defined in Store view scope for field "Locale code for HrefLang". Define which store view will have a tag "x-default" attached.

Additionnal config by Store view
--------------------------------

[](#additionnal-config-by-store-view)

[![system_config_screenshot2.png](system_config_screenshot2.png)](system_config_screenshot2.png)

### Use this store for Href Lang Block

[](#use-this-store-for-href-lang-block)

Can exclude targeted store view from hreflang system

### Locale code for HrefLang Tag

[](#locale-code-for-hreflang-tag)

(e.g. "fr", "en-us", "es-us"). By Default will use global locale configuration

Add your own hreflang system in the providers
=============================================

[](#add-your-own-hreflang-system-in-the-providers)

You can add additionnal hreflang URL based on different module logic easily.

1. Declare your provider in your di.xml file within a separated Magento Module (e.g. HrefLangContentManager)

```

                    Blackbird\HrefLangContentManager\Model\Provider\Content
                    8
                    true

```

2. Define your PHP Class and implements ProviderInterface : Example For Advanced Content Manager Module :

```
