devsaredead
Forum Replies Created
-
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?so it was just some misunderstanding, yes I wish to have the custom tab just for the “phones” category, however it doesn’t work: the custom tabs has disappeared for all categories. But I have noticed that my permalink is structured like this: domain.com/shop-name/product-name/ and my category is domain.com/product_cat/phones/ So maybe we need a different code? Sorry for taking your time…
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?…I’m not sure it works, or maybe it’s just me who coded it wrong. I have it like this:
if (class_exists( 'Falang' ))
if ( has_term( 'Phones', 'product_cat' ) ) {
echo 'found';
}
{
$current_locale = Falang()->get_current_language()->locale;
if ($current_locale == 'it_IT'){
//my code for italian
}
if ($current_locale == 'en_US'){
//my code for english
}and still have the custom tab on all products.
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?unfortunately it doesn’t work (the tab disappears)
if (class_exists( 'Falang' ))
if( is_product() && has_category( 'Phones' ) ) {
$current_locale = Falang()->get_current_language()->locale;I shall hope you will find out more….
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?…sorry Stéphane, I don’t mean to take advantage of your time but could you help me with a small tweak? I have noticed that the custom tab is added to every products, whereas I wish to have it only for one category. So I think I must add something like
if( is_product() && has_category( 'Phones' ) )but I don’t know where I should insert it in the function we created. 🙁 I have made some attempts but I failed….
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?Brilliant! Thanks for the tip! Top support 🙂
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?…thank you very much indeed for always being so helpful! I have edited my function and I must say that it works! If you would not mind to have a look at the final function, in case you spot any possible errors that could conflict with other things, I’d appreciate:
/* New Product Tab @ WooCommerce Single Product */
if ( function_exists( 'falang_current_language' ) ) {
$current_locale = falang_current_language('locale');
if ($current_locale == 'it_IT'){
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab', 9999 );
function woo_new_product_tab( $tabs ) {
$tabs['docs'] = array(
'title' => __( 'Preventivo', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_new_product_tab_content',
);
return $tabs;
}
function woo_new_product_tab_content() {
// The new tab content
global $product;
echo 'richiesta noleggio volo per ' . $product->get_name();
echo do_shortcode( '[forminator_form id="1046"]' );
}
}
if ($current_locale == 'en_US'){
//my code for english, same as above but with strings translated
}
}Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?I have resolved point 4 easily, but for the function I explained myself wrong. What I need is not just translate the words but trigger the function if the page is in english. So it would be exactly like point 4: having 2 functions and echo the italian/english respectively if the page is in italian or english. I’m not a developer so I wouldn’t even know if it’s possible to do something like that. (the function is one for adding a custom tab to the product page tabs)
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] why don’t translations get deleted?yes, I have actually noticed that it takes a while, after a few refresh and some caching clearance the translation finally goes away. Looking forward for the fix. Thank you
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] bugs or wrong settings?thank you, it’s not a problem, I can add the language columns with the plugin 🙂
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] why don’t translations get deleted?godday Stéphane, I’m into the “translate posts” page, when I try to delete a translation the system doesn’t seem to execute and I still find the translations in my posts page.
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] bugs or wrong settings?Dear Stéphane, I remember I run into the same problem once, and here’s the old post with the solution. I have now resolved the shop page by putting my shop slug (“negozio”) in the falang product options > post type archive link and post type base link althogh I don’t know how the problem occurred because I actually didn’t translate the shop page. 🙂 Maybe there is some bug, really…
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] bugs or wrong settings?- yes, I use Acolumns, it detects all post types and creates a column with them. “Traduzioni” was found as default, so I added it to the post list page
- The portfolio is a CPT of my theme but it’s the same as a page, i.e. I build the content with Wpbakery or I can just use html
- my pages are very porr in content, so it’s not a problem for me to copy the Wpbakery code and translate manually. I’d prefere to have less plugins/addons
Sorry, could you check what’s wrong with my shop page? Falang seems to have broken the filters in the sidebar. And if I deactivate Falang the shop page redirects to homepage. Please help !!!
- This reply was modified 1 year, 8 months ago by devsaredead.
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] one menu item is shown twice….in order to eliminate the duplicates I have deleted all “drafts” from my database. Resolved!
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] bugs or wrong settings?- I have created that flags column with my plugin, the column is not visible otherwise
- I cannot make videos but you can see from this image that the portfolio does not fetch the content
- The content for instance was just a text element with color# applied in the style. Is the Wpbakery addon working as a stand alone, or do I have to have Falang installed as well?
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] one menu item is shown twicelet’s not give up, Stéphane… I have looked into the options and Falang has actually detected quite a few of my theme’s CPT. For instance there is _mytheme_header_title and _mytheme_header_subtitle which belongs to my pages’ header metabox. So I went to the page, opened the English translation box,… and it works!
Genius. I’ll experiment more with my staging site, and if it works for everything I will definitely use it… I haven’t seen any other multilanguage switcher as smart as Falang. 🙂