Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

Language Switcher and Atahualpa 3


  #1  
Old Feb 6, 2009, 02:09 PM
arnaud
 
3 posts · Feb 2009
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.
  #2  
Old Feb 6, 2009, 02:22 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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.
  #3  
Old Feb 6, 2009, 02:28 PM
arnaud
 
3 posts · Feb 2009
Hi Flynn,

Thanks a lot !!!!!

Yes I meant the main title in the header (La Integracion Axiotonal and The axiotonal Integration)
  #4  
Old Feb 6, 2009, 09:01 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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.
  #5  
Old Feb 7, 2009, 04:23 AM
arnaud
 
3 posts · Feb 2009
worked like a charm!

Thanks a lot
  #6  
Old Feb 7, 2009, 10:54 AM
teddybear
 
7 posts · Jan 2009
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.
  #7  
Old Feb 7, 2009, 12:01 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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.
  #8  
Old Feb 7, 2009, 01:54 PM
teddybear
 
7 posts · Jan 2009
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.
  #9  
Old Jun 25, 2009, 09:00 AM
PittFunck
 
13 posts · Mar 2009
Zurich
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?
  #10  
Old Jun 26, 2009, 04:32 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by PittFunck
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
  #11  
Old Jun 28, 2009, 04:13 PM
PittFunck
 
13 posts · Mar 2009
Zurich
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
  #12  
Old Jun 29, 2009, 11:05 AM
PittFunck
 
13 posts · Mar 2009
Zurich
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
  #13  
Old Jun 30, 2009, 06:15 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by PittFunck
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
  #14  
Old Jul 1, 2009, 08:32 AM
PittFunck
 
13 posts · Mar 2009
Zurich
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
  #15  
Old Jul 28, 2009, 03:47 PM
szegan
 
2 posts · Jul 2009
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
  #16  
Old Aug 3, 2009, 07:02 PM
PittFunck
 
13 posts · Mar 2009
Zurich
I've got the same problem... so this is a gentle bump...
  #17  
Old Aug 8, 2009, 06:26 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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)); 
  #18  
Old Aug 13, 2009, 11:15 AM
PJW
 
1 posts · Aug 2009
Sweden
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?
  #19  
Old Sep 3, 2009, 08:18 AM
szegan
 
2 posts · Jul 2009
Hi Flynn,

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

Regards,
Stefan
  #20  
Old Sep 17, 2009, 08:57 AM
PittFunck
 
13 posts · Mar 2009
Zurich
Quote:
Originally Posted by Flynn
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

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Other language Newgamer Languages & Translations 13 May 24, 2010 01:10 PM
How change language Diego Velazquez Languages & Translations 17 May 11, 2009 03:58 PM
Japanese Atahualpa 3.3.3 language files needed TGsoft Languages & Translations 0 May 11, 2009 07:29 AM
How can I change the language in Romanian?? antimatrix Languages & Translations 1 Mar 20, 2009 04:45 PM
change in romanian language c32v Languages & Translations 0 Feb 11, 2009 12:58 PM


All times are GMT -6. The time now is 04:48 PM.


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