Lovro Hrust
Forum Replies Created
-
Forum: Plugins
In reply to: [nLingual] Translated categoryI managed to solve the problem. It was an AJAX call, so language was not set correctly, due to hack employed to use always default language first, regardless of browser settings.
However, I passed original language value from javascript back into PHP and set current language to one that was active when page was loaded$language_slug = $_GET['lang']; $language = nLingual\Registry::get_language($language_slug); nLingual\Registry::set_language($language);
however, I have another problem, I have to get post (post object or id) in default language if I know $post object from another language. Is there any method for that?
- This reply was modified 4 years ago by Lovro Hrust.
- This reply was modified 4 years ago by Lovro Hrust.
Forum: Plugins
In reply to: [Breadcrumb NavXT] wrap breadcrumb html output in another tagI already solved it by defining another function which outputs html opening and closing tag and bcn_display(); in the middle.
If there is another way using aforementioned techniques in original question, please write.After deactivating and activating again they started working again. I am not sure if that was related to your plugin.
Forum: Plugins
In reply to: [nLingual] Bulk editI tested new change to the plugin on production server, it worked without errors, it is probably something due to my local instalation.
Forum: Plugins
In reply to: [nLingual] Bulk editCould be something due to my setup. If I find out, I’ll let you know.
Forum: Plugins
In reply to: [nLingual] Bulk editI tested update. I had to clear both languages codes, and when doing so I got PHP errors, something about vsprint function and that headers had already been sent.
Except for these errors when clearing codes, your change worked the same as mu-plugin solution.
Forum: Plugins
In reply to: [nLingual] Bulk editThanks, I’ll try that. Cheers!
Edit: your last solution with unset server var in mu-plugins works fine!- This reply was modified 4 years, 2 months ago by Lovro Hrust.
Forum: Reviews
In reply to: [WP Multilang - Translation and Multilingual Plugin] Great pluginWhen you disable plugin, it is “messed” (plugin codes are embedded and shown on front. When uninstalled, I am not sure. You can make backup of database, try installing/uninstalling and see what happens! You can always revert to backup.
Forum: Plugins
In reply to: [nLingual] Bulk editI currently came with this, inside must-use plugin (is there a way to use filters from your plugin in functions.php?).
This prevents redirections from front page to english version of front page if language slug does not exist in URL when root URL of the page is opened.
I would also like to prevent /hr/ slug extensions for croatian pages.
add_filter( 'nlingual_detected_language', function($language) { $newlanguage = $language; if ($_SERVER['REQUEST_URI'] === "/") $newlanguage = \nLingual\Registry::get_language('hr'); return $newlanguage; } );
Forum: Plugins
In reply to: [nLingual] Bulk editI tried setting language of the site in wordpress to Croatian, as well as disabling “skip localization for default language”, but I am still getting redirected to english version on home page, although I would wish it is Croatian.
Could you give me a hint about the place in the code where I can change this, so default homepage language would be Croatian?
Forum: Developing with WordPress
In reply to: Rebuilding wordpress core image blockYes, that was the reason. I took 5.5 version and it was working fine. I was unaware of Block API changes in 5.6.
Forum: Plugins
In reply to: [nLingual] Bulk editNo, default language is Croatian, while both system and browser languages are English.
Forum: Plugins
In reply to: [nLingual] Bulk editI managed to resolve last issue (i18n functions did not work) and it was apparently due to a change of source file which was not reflected in .po and .mo files.
Now the first two issues still remain…
Also, “Skip Localization for Default Language?”, does not work as well, I am getting /ll/ in url for both languages that are set up.
And there is no Language dropdown in bulk edit.Any help would be greatly appreciated. Second issue is not so important.
Forum: Plugins
In reply to: [nLingual] Bulk editThere is still no Language dropdown?
Also, “Skip Localization for Default Language?”, does not work as well, I am getting /ll/ in url for both languages that are set up.Further, which may not be at all related to your plugin, but i18n functions in my theme do not work, it may be some issue due to windows environment and local development. Any hint in resolving this would be greatly appreciated.
- This reply was modified 4 years, 4 months ago by Lovro Hrust.
Forum: Plugins
In reply to: [nLingual] Language switching does not work properlyI resolved the issue, which was not due to your plugin. The theme I was developing was a child theme of my previous master theme. I forgot that I put filter locale to ‘hr_HR’ inside.