Dennis Ploetner
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Custom post type link not workOK, could you please debug what you get in the callback function?
error_log( $language . ': ' . $url );or similar…- This reply was modified 7 years, 9 months ago by Dennis Ploetner.
Forum: Plugins
In reply to: [Multisite Language Switcher] Custom post type link not workWhat is the exact locale of the English website? Is it really en_GB?
Forum: Plugins
In reply to: [Multisite Language Switcher] Custom post type link not workThis could be a permalink issue. Please, try to refresh these by visiting the permalinks settings in the WordPress admin.
The plugin writes just its options (when you save settings in the dashboard). So this is nothing to clean.
Very often it needs just a refresh in the permalinks to avoid this kind of strange behaviour in a WordPress website.
It should also work in the functions.php. Of course – a plugin that you control would probably be a safer place for the snippet.
I guess that the locale of the english webseite is not ‘en_US’ … just try this to confirm that:
function my_msls_options_get_permalink( $url, $language ) { if ( 'it_IT' == $language ) { $url = str_replace( '/product/', '/prodotto/', $url ); } else { $url = str_replace( '/prodotto/', '/product/', $url ); } return $url; } add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );Hello,
MSLS should save the translated strings alone but there are some scenarios when this can’t be done.
You can use a filter for this:
https://gist.github.com/lloc/5f922fc770d818365992#file-msls_options_get_permalink-php
Read on here too:
http://msls.co/hooks-filters-and-actions/
Cheers.
DennisForum: Reviews
In reply to: [Multisite Language Switcher] i love itYou’re welcome 🙂
Please use the issue-tracker on git hub for requests like this or send a pull request if you like. 😉
https://github.com/lloc/Multisite-Language-Switcher
- This reply was modified 8 years, 1 month ago by Dennis Ploetner.
This plugin ties your translations together. There is no translation engine integrated.
Cheers,
DennisYour function does not return the $language.
function switcheroo() { $blog = MslsBlogCollection::instance()->get_current_blog(); return $blog->get_language(); }You can also use the WordPress-function
get_locale()in your case.<?php if ( 'de_DE' == get_locale() ) { ?> <!-- German content here--> German content <?php } else { ?> <!-- English content here--> English content <?php } ?>Forum: Plugins
In reply to: [Multisite Language Switcher] How to connect posts in the database?It depends on the content but these are mainly hash-maps in the options-tables.
I know about this limitation. We are working on this (like a lot of other things). If you could check and see (or give feedback) here when you have time: https://github.com/lloc/Multisite-Language-Switcher/
Forum: Plugins
In reply to: [Multisite Language Switcher] Woocommerce supportI’m taken with the tests of the upcoming version 1.2 and some interesting pull requests. I’m not sure if we resolved this completely but you could help if you have a test environment: https://github.com/lloc/Multisite-Language-Switcher/releases/download/v1.2/multisite-language-switcher.zip
I’m sorry but in that case using my plugin wouldn’t be successful. But there are other plugins like Polylang for example…
But your website is a Multisite with different languages for each site?