Title: Dennis Ploetner's Replies - page 5 | WordPress.org

---

# Dennis Ploetner

  [  ](https://wordpress.org/support/users/realloc/)

 *   [Profile](https://wordpress.org/support/users/realloc/)
 *   [Topics Started](https://wordpress.org/support/users/realloc/topics/)
 *   [Replies Created](https://wordpress.org/support/users/realloc/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/realloc/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/realloc/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/realloc/engagements/)
 *   [Favorites](https://wordpress.org/support/users/realloc/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 61 through 75 (of 2,033 total)

[←](https://wordpress.org/support/users/realloc/replies/page/4/?output_format=md)
[1](https://wordpress.org/support/users/realloc/replies/?output_format=md) [2](https://wordpress.org/support/users/realloc/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/realloc/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/realloc/replies/page/4/?output_format=md)
5 [6](https://wordpress.org/support/users/realloc/replies/page/6/?output_format=md)…
[134](https://wordpress.org/support/users/realloc/replies/page/134/?output_format=md)
[135](https://wordpress.org/support/users/realloc/replies/page/135/?output_format=md)
[136](https://wordpress.org/support/users/realloc/replies/page/136/?output_format=md)
[→](https://wordpress.org/support/users/realloc/replies/page/6/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Href Lang Tag issue](https://wordpress.org/support/topic/href-lang-tag-issue/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/href-lang-tag-issue/#post-18070898)
 * I gave you an example of a rewrite of your function. What you really want to 
   archive is probably something like this:
 *     ```wp-block-code
       add_filter( 'msls_head_hreflang', function ( $language ) {    return str_replace( '_', '-', $language );} );
       ```
   
 * The plugin itself applies the following logic though: If the language code contains
   the region, but the language is exclusive (like German in your example) then 
   the country code will be removed because it is redundant.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Href Lang Tag issue](https://wordpress.org/support/topic/href-lang-tag-issue/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/href-lang-tag-issue/#post-18058615)
 * This function here probably does the same as your example:
 *     ```wp-block-code
       add_filter( 'msls_head_hreflang', function ( $language ) {    $map = array(        'en_US' => 'en_us',        'en-gb' => 'en',        'es-es' => 'es',        'fr'    => 'x-default',    );    return $map[ $language ] ?? $language;} );
       ```
   
 * In the same function exists another filter called “mlsl_output_get_alternate_links_arr”
   which expects the array with the generated links as input:
 *     ```wp-block-code
       add_filter( 'mlsl_output_get_alternate_links_arr', function ( $links ) {    // do something with the array of links    return $links;} );
       ```
   
    -  This reply was modified 1 year, 11 months ago by [Dennis Ploetner](https://wordpress.org/support/users/realloc/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Site language –> Available languages empty](https://wordpress.org/support/topic/site-language-available-languages-empty/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/site-language-available-languages-empty/#post-18049978)
 * Glad I could help! Have fun with the Multisite Language Switcher. 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Site language –> Available languages empty](https://wordpress.org/support/topic/site-language-available-languages-empty/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/site-language-available-languages-empty/#post-18048262)
 * Do you refer to the description that you can set in the settings of the plugin?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Site language –> Available languages empty](https://wordpress.org/support/topic/site-language-available-languages-empty/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/site-language-available-languages-empty/#post-18047943)
 * I guess that this has to have also a language file in `/wp-content/languages/—`
   at least as far as I remember.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Site language –> Available languages empty](https://wordpress.org/support/topic/site-language-available-languages-empty/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/site-language-available-languages-empty/#post-18047456)
 * I just realized that the above is not correct. This one is better:
 *     ```wp-block-code
       /** * @param array $languages * @return array */function my_msls_options_get_available_languages( $languages ) {	if ( ! isset( $languages['en_IN'] ) ) {		$languages['en_IN'] = 'English (India)';	}	return $languages;}add_filter( 'msls_options_get_available_languages', 'my_msls_options_get_available_languages' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Site language –> Available languages empty](https://wordpress.org/support/topic/site-language-available-languages-empty/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/site-language-available-languages-empty/#post-18047069)
 * Hello,
 * please make sure that you return also the array languages that is incoming when
   you use the hook **my_msls_options_get_available_languages** to add a language.
 * Here is an example of your specific use-case:
 *     ```wp-block-code
       /** * @param array $languages * @return string */function my_msls_options_get_available_languages( languages ) {    if ( ! isset( $languages['en_IN'] ) ) {        $languages['en_IN'] = 'English (India)';    }    return $languages;}add_filter( 'msls_options_get_available_languages', 'my_msls_options_get_available_languages' );
       ```
   
 * As you can see, **languages** is an associative array. The keys are the language
   and region code and the value is the description.
    -  This reply was modified 1 year, 11 months ago by [Dennis Ploetner](https://wordpress.org/support/users/realloc/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] WooCommerce product slug is suddenly used incorrectly](https://wordpress.org/support/topic/woocommerce-product-slug-is-suddenly-used-incorrectly/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/woocommerce-product-slug-is-suddenly-used-incorrectly/#post-18013096)
 * Did you by any chance use a hook to help WooCommerce with the translated slug?
   The hook
   **msls_options_get_permalink** is also documented [here](https://msls.co/developer-docs/hook-reference/):
 *     ```wp-block-code
       /** * @param string $postlink * @param string $language * @return string */function my_msls_options_get_permalink( $url, $language ) {    if ( 'de_DE' == $language ) {        $url = str_replace( '/products/', '/produkte/', $url );    }    return $url;}add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Bug %s](https://wordpress.org/support/topic/bug-s/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/bug-s/#post-17905476)
 * I just created a new version (2.8.2) that fixes this problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Bug %s](https://wordpress.org/support/topic/bug-s/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/bug-s/#post-17901015)
 * Hello, thanks for reaching out. Is this a current version? I see that it works
   in other pages like [https://viacampesina.org/es/16oct21-no-hay-futuro-sin-soberania-alimentaria-es-tiempo-de-transformar/](https://viacampesina.org/es/16oct21-no-hay-futuro-sin-soberania-alimentaria-es-tiempo-de-transformar/)
   but shows the problem in the page you linked.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Author BIO](https://wordpress.org/support/topic/author-bio-5/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/author-bio-5/#post-17887687)
 * Hey Ivan,
 * I guess I can reactivate this one here quickly: [https://github.com/lloc/Whoami](https://github.com/lloc/Whoami)
 * This would add a description field in any blog. Is it what you were looking for?
 * Cheers!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Plugin “Network Shared Media” recommended by the FAQ has been closed.](https://wordpress.org/support/topic/plugin-network-shared-media-recommended-by-the-faq-has-been-closed/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/plugin-network-shared-media-recommended-by-the-faq-has-been-closed/#post-17878537)
 * Thanks for pointing that out. I will look up what alternatives are currently 
   out there.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Redirect Error and unable](https://wordpress.org/support/topic/redirect-error-and-unable/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/redirect-error-and-unable/#post-17823607)
 * Version 2.8.1 is out and solves this problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Redirect Error and unable](https://wordpress.org/support/topic/redirect-error-and-unable/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/redirect-error-and-unable/#post-17823301)
 * I can confirm the bug. It happens also here: [https://msls.co/topics/general/](https://msls.co/topics/general/)
 * A patch will be provided very soon.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multisite Language Switcher] Redirect Error and unable](https://wordpress.org/support/topic/redirect-error-and-unable/)
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/redirect-error-and-unable/#post-17822542)
 * This is weird because it works normally out of the box for every plugin.

Viewing 15 replies - 61 through 75 (of 2,033 total)

[←](https://wordpress.org/support/users/realloc/replies/page/4/?output_format=md)
[1](https://wordpress.org/support/users/realloc/replies/?output_format=md) [2](https://wordpress.org/support/users/realloc/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/realloc/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/realloc/replies/page/4/?output_format=md)
5 [6](https://wordpress.org/support/users/realloc/replies/page/6/?output_format=md)…
[134](https://wordpress.org/support/users/realloc/replies/page/134/?output_format=md)
[135](https://wordpress.org/support/users/realloc/replies/page/135/?output_format=md)
[136](https://wordpress.org/support/users/realloc/replies/page/136/?output_format=md)
[→](https://wordpress.org/support/users/realloc/replies/page/6/?output_format=md)