Dennis Ploetner
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Site language –> Available languages emptyDo you refer to the description that you can set in the settings of the plugin?
Forum: Plugins
In reply to: [Multisite Language Switcher] Site language –> Available languages emptyI guess that this has to have also a language file in
/wp-content/languages/ —at least as far as I remember.Forum: Plugins
In reply to: [Multisite Language Switcher] Site language –> Available languages emptyI just realized that the above is not correct. This one is better:
/**
* @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
In reply to: [Multisite Language Switcher] Site language –> Available languages emptyHello,
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:
/**
* @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, 8 months ago by Dennis Ploetner.
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:/**
* @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
In reply to: [Multisite Language Switcher] Bug %sI just created a new version (2.8.2) that fixes this problem.
Forum: Plugins
In reply to: [Multisite Language Switcher] Bug %sHello, 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/ but shows the problem in the page you linked.
Forum: Plugins
In reply to: [Multisite Language Switcher] Author BIOHey Ivan,
I guess I can reactivate this one here quickly: https://github.com/lloc/Whoami
This would add a description field in any blog. Is it what you were looking for?
Cheers!
Thanks for pointing that out. I will look up what alternatives are currently out there.
Forum: Plugins
In reply to: [Multisite Language Switcher] Redirect Error and unableVersion 2.8.1 is out and solves this problem.
Forum: Plugins
In reply to: [Multisite Language Switcher] Redirect Error and unableI can confirm the bug. It happens also here: https://msls.co/topics/general/
A patch will be provided very soon.
Forum: Plugins
In reply to: [Multisite Language Switcher] Redirect Error and unableThis is weird because it works normally out of the box for every plugin.
Forum: Plugins
In reply to: [Multisite Language Switcher] Redirect Error and unableHow did you install it? By uploading the zip?
Forum: Plugins
In reply to: [Multisite Language Switcher] Redirect Error and unableDid you check if the version 2.7.1 has the same problem? You can download older versions also from here: https://ww.wp.xz.cn/plugins/multisite-language-switcher/advanced/
Forum: Plugins
In reply to: [Multisite Language Switcher] Redirect Error and unableHey, I can check but it would be great if you compare too. Versions are available here in the plugin directory or at https://github.com/lloc/Multisite-Language-Switcher.