Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   Language Switcher and Atahualpa 3 (http://forum.bytesforall.com/showthread.php?t=210)

arnaud Feb 6, 2009 01:09 PM

Language Switcher and Atahualpa 3
 
I am using your theme on my website http://www.axiotonal.com since a year or two and I just upgraded to the outstanding v3.2.

The only problem I am running into is the fact that I am using the plug in Language Switcher to be able to offer a multilingual version of our website.
This plugin was working fine in the last version installed (v2.1) but not in 3.2:

EVerything is ok (post language switching for instance) but the main title in header and the categories in posts footer (see website).

I asked the developer of that plugin and she told me the following:
Quote:

Likely the problem is that the theme developer used some "un-filtered" WordPress functions in the new version, and the old version used "filtered" functions to display the same information. For instance, many WP functions with "get" in their name are unfiltered, while the functions without "get" in the name are generally filtered.

Some of the text might also be directly in the theme file. If that is the case, did the theme author provide for the theme to be translated into other languages? You might need to get POT/PO/MO files.

There is a section on the Language Switcher home page that explains more about this. Good luck!

Regards,
Jennifer
Is there any way to solve this issue ASAP ?
If not, do you know of any alternative that would allow me to offer english AND spanish content ?

Thanks a lot for anyone's help.

Flynn Feb 6, 2009 01:22 PM

With "main title in header" you mean the blog tagline "The Axiotonal Integration" right, and not the post titles?

The part about filtered and unfiltered is true, I'll try to make a modified version of bfa_postinfo.php later today, in a few hours, and will post it here for you to try out.

arnaud Feb 6, 2009 01:28 PM

Hi Flynn,

Thanks a lot !!!!!

Yes I meant the main title in the header (La Integracion Axiotonal and The axiotonal Integration)

Flynn Feb 6, 2009 08:01 PM

Can you please try this:

In functions/bfa_header_config.php, find, starting at around line 85:

PHP Code:

    // Blog title and description
    
if ( $bfa_ata_blog_title_show == "Yes" OR $bfa_ata_blog_tagline_show == "Yes" ) {
    
$logo_area .= '<td ' $header_rowspan 'valign="middle" class="logoarea-title">';
            if ( 
$bfa_ata_blog_title_show == "Yes" ) {
            
$logo_area .= '<h1 class="blogtitle"><a href="' get_option('home') . '/">' get_bloginfo('name') . '</a></h1>';      
            }
            if ( 
$bfa_ata_blog_tagline_show == "Yes" ) {
            
$logo_area .= '<p class="tagline">' get_bloginfo'description' ) . '</p>';
            }
    
$logo_area .= '</td>';
    }
    
// END of title/description 

and replace with

PHP Code:

    // Blog title and description
    
if ( $bfa_ata_blog_title_show == "Yes" OR $bfa_ata_blog_tagline_show == "Yes" ) {
    
$logo_area .= '<td ' $header_rowspan 'valign="middle" class="logoarea-title">';
            if ( 
$bfa_ata_blog_title_show == "Yes" ) {
            
#$logo_area .= '<h1 class="blogtitle"><a href="' . get_option('home') . '/">' . get_bloginfo('name') . '</a></h1>';
            
ob_start(); bloginfo('name'); $logo_area .= '<h1 class="blogtitle"><a href="' .get_option('home'). '/">' ob_get_contents() . '</a></h1>'ob_end_clean();            
            }
            if ( 
$bfa_ata_blog_tagline_show == "Yes" ) {
            
# $logo_area .= '<p class="tagline">' . get_bloginfo( 'description' ) . '</p>';
            
ob_start(); bloginfo('description'); $logo_area .= '<p class="tagline">' ob_get_contents() . '</p>'ob_end_clean();
            }
    
$logo_area .= '</td>';
    }
    
// END of title/description 

And in functions/bfa_postinfo.php, find, starting at around line 87:

PHP Code:

// remove last separator
$categories preg_replace("/".$category_matches[2]."$/mi"""$categories);
$categories_linked preg_replace("/".$category_linked_matches[2]."$/mi"""$categories_linked);


and replace with

PHP Code:

// remove last separator
$categories preg_replace("/".$category_matches[2]."$/mi"""$categories);
$categories_linked preg_replace("/".$category_linked_matches[2]."$/mi"""$categories_linked);
ob_start(); the_category(', '); $categories_linked ob_get_contents(); ob_end_clean();


Then upload the 2 modified files functions/bfa_header_config.php and functions/bfa_postinfo.php and see if it works.

arnaud Feb 7, 2009 03:23 AM

worked like a charm!

Thanks a lot :)

teddybear Feb 7, 2009 09:54 AM

Thank you so much Flyn, it works perfect on my Blog too: www.anbinh.info/blog
Can you also help me with a hack to also internalise these texts too:

"Tags", "Category", "Leave a comment" under each post info

"Home" in page menu bar

"Posts" and "Comments" on the subscription in the top-right corner and also their tooltips

Prefilled text in the Search box :)

I hope it's not too much.

Btw, I'll update you with the latest vi.mo translation soon.

Flynn Feb 7, 2009 11:01 AM

Those terms are not generated by WP functions but plain text and can be customized through the Theme Options. The ob_start() technique I used above was for functions, it wouldn't change the terms you mentioned.

I will localize them though for one of the next versions.

Thanks, I have already updated all .po/.mo files for 3.2 and they're already included in the release.

It would be good if you could do an update once those default terms in the Theme Options are localized though.

teddybear Feb 7, 2009 12:54 PM

Thanx Flynn for ur super fast response. Clear about those!
How about the copyright at the end of the page? Both Arnaud's and my website have the same issue.

PittFunck Jun 25, 2009 08:00 AM

Hello, I have the same problem that the tagline doesn't work with Language Switcher.

I tried the fix in functions/bfa_header_config.php and in functions/bfa_postinfo.php, but it didn't work. Did I make a mistake, or are these fixes not working any more with Atahualpa 3.3.3?

Thanks in advance
Pitt

P.S. Are you considering implementing the change in Atahualpa 3.3.4?

Flynn Jun 26, 2009 03:32 PM

Quote:

Originally Posted by PittFunck (Post 9131)
Hello, I have the same problem that the tagline doesn't work with Language Switcher.

I tried the fix in functions/bfa_header_config.php and in functions/bfa_postinfo.php, but it didn't work. Did I make a mistake, or are these fixes not working any more with Atahualpa 3.3.3?

Thanks in advance
Pitt

P.S. Are you considering implementing the change in Atahualpa 3.3.4?

These changes should be incorporated in 3.3.3. Are you sure you have 3.3.3? The version on the WP theme viewer is still 3.2

PittFunck Jun 28, 2009 03:13 PM

Hello Flynn,

yes, I definitely have 3.3.3 installed and activated. You can have a look at the provisional location of my site: funck.ch/wordpress.

When I insert [lang_en], [lang_de], [/lang_en] or [/lang_de] in the tagline, they appear as such in the website instead of being interpreted.

Cheers, Pitt

PittFunck Jun 29, 2009 10:05 AM

I've found out something: Language Switcher DOES work with the tagline in the logo area, but it DOESN'T work with the tagline overlayed over the header image...!

Cheers, Pitt

Flynn Jun 30, 2009 05:15 PM

Quote:

Originally Posted by PittFunck (Post 9313)
I've found out something: Language Switcher DOES work with the tagline in the logo area, but it DOESN'T work with the tagline overlayed over the header image...!

Cheers, Pitt

I see where this is coming from, it'll be fixed in 3.3.4

PittFunck Jul 1, 2009 07:32 AM

Thanks a lot, looking forward to 3.3.4...

For the time being, is there a quick and dirty fix by editing some .php files?

I found another place where Language Switcher is not working: the name of the home link in the page menu bar...

Thanks and cheers
Pitt

szegan Jul 28, 2009 02:47 PM

Hi,
I encounter a problem of the Atahualpa 3.4.2 theme together with the Language Switcher plugin.
The page/post title (body title) (e.g.: "[lang_en]Title[/lang_en][lang_de]Titel[/lang-de]") is only resolved by LS when you directly publish the page. If the page is modified later, or it is first saved as draft and published later, then the body title will not correctly be published on the website (i.e. the full string as given above is printed); but the links to the page seems to be okay.

It seems, that your introduced "bfa_ata_body_title" or "bfa_ata_body_title_multi" attributes are responsible for this behavior. If I remove the strings from the Atahualpa Page Options and the Custom Fields in the page edit form before publishing, then it seems to be okay again. Until you start to edit the page again....

Maybe this behavior corresponds to the situation described in the Language Switcher FAQ, point 4, doesn't it?

Is there an easy fix?

Regards,
Stefan

PittFunck Aug 3, 2009 06:02 PM

I've got the same problem... so this is a gentle bump...

Flynn Aug 8, 2009 05:26 AM

Try replacing in functions/bfa_post_parts.php, this:
PHP Code:

        $bfa_ata_body_title get_post_meta($post->ID'bfa_ata_body_title'true);
        
$bfa_ata_display_body_title get_post_meta($post->ID'bfa_ata_display_body_title'true);
    } else {
        
$bfa_ata_body_title_multi get_post_meta($post->ID'bfa_ata_body_title_multi'true); 

with this:
PHP Code:

        $bfa_ata_body_title apply_filters('the_title',get_post_meta($post->ID'bfa_ata_body_title'true));
        
$bfa_ata_display_body_title get_post_meta($post->ID'bfa_ata_display_body_title'true);
    } else {
        
$bfa_ata_body_title_multi apply_filters('the_title',get_post_meta($post->ID'bfa_ata_body_title_multi'true)); 


PJW Aug 13, 2009 10:15 AM

Not sure what I am doing wrong.

I have Atahualpa 3.4.1 installed and the code you refer to above in #17 Flynn is not available in my bfa_post_parts.php.
I can not find the section to remove.
When searching for the section to add instead I can not find that either.

Am just getting tired or what?:confused:

szegan Sep 3, 2009 07:18 AM

Hi Flynn,

Thank you very much. That seems to work for me.

Regards,
Stefan

PittFunck Sep 17, 2009 07:57 AM

Quote:

Originally Posted by Flynn (Post 12200)
Try replacing in functions/bfa_post_parts.php, this:
PHP Code:

        $bfa_ata_body_title get_post_meta($post->ID'bfa_ata_body_title'true);
        
$bfa_ata_display_body_title get_post_meta($post->ID'bfa_ata_display_body_title'true);
    } else {
        
$bfa_ata_body_title_multi get_post_meta($post->ID'bfa_ata_body_title_multi'true); 

with this:
PHP Code:

        $bfa_ata_body_title apply_filters('the_title',get_post_meta($post->ID'bfa_ata_body_title'true));
        
$bfa_ata_display_body_title get_post_meta($post->ID'bfa_ata_display_body_title'true);
    } else {
        
$bfa_ata_body_title_multi apply_filters('the_title',get_post_meta($post->ID'bfa_ata_body_title_multi'true)); 


This code is only present in 3.4.2, not in 3.4.1. Doesn't work for me, though, I get

Parse error: syntax error, unexpected T_VARIABLE in /home/funckch/www/funck.ch/wp-content/themes/atahualpa342/functions/bfa_post_parts.php on line 76

What was my mistake?
Thanks in advance
Pitt


All times are GMT -6. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.