Example. Tip for show flags in your webpage.

Having Problems? Need Help? Post here!

Example. Tip for show flags in your webpage.

Postby Corbacho » Sat Jan 31, 2009 7:06 pm

Hi everyone,

I really like this plugin and I don't have words to thank you your effort Qian Qin.

I have installed your plugin in my blog http://corbacho.info/finlandia (check that flags are floating) allowing you to show the flags in the sidebar with the widget for Wordpress. But I think that they can be unnoticed, so I will show you what I have done for spot the flags more easily. It's really easy trick with CSS.

Image

If you have wordpress 2.7, go to the sidebar Appearance -> Editor -> style.css and at the end of the file put these two lines with your languages codes:
Code: Select all
.qtrans_flag_en { position:fixed;top:20px;left:2px;border:1px solid #BBBBBB }
.qtrans_flag_ES { position:fixed;top:40px;left:2px;border:1px solid #BBBBBB }


If you have a file called style.php you will have to do the same there too.

In my case is Spanish (.qtranslate_flag_ES) and English (_en), but yours can be different.
Try different distances in top and left.
If you wish to put them floating in the bottom of your page use bottom instead of top
Corbacho
 
Posts: 5
Joined: Wed Jan 28, 2009 9:15 pm

Re: Example. Tip for show flags in your webpage.

Postby ralfmue » Tue Feb 03, 2009 10:48 am

Hi, thanks for this piece of code. My problem: When I remove the qtrans - lines again from style.css (style.php not available in aspire theme), the flags still appear in fixed position.

Is it just a cache problem (allthough all other changes are appearing instantanously) ? I tried to clear the Firefox3-Cache, but no menu-item seemed to match...
Or are other settings changed, when I change the style.css?

(I'm yet not so familiar with code changes in wordpress.)

Thanks for short reply,
Ralf
ralfmue
 
Posts: 7
Joined: Mon Feb 02, 2009 5:11 pm

Re: Example. Tip for show flags in your webpage.

Postby Corbacho » Tue Feb 03, 2009 8:28 pm

1. Make sure you press "update file" when you change style.css

2. Maybe is a cache issue, try to make a test: save the page in your hard disk. If your save it with the name mypage.html, then in the folder mypage_files should be the style.css. Open it with a text editor and check if "fixed" appears or not.

3. Maybe you have cache enabled in wordpress, I have wp-super-cache plugin. In the dashboard go to settings of wp-super-cache and empty the cache.

4. Open the webpage with a different browser.

MMm.. I don't know what else you can try. Tell here if nothing of these works.
Corbacho
 
Posts: 5
Joined: Wed Jan 28, 2009 9:15 pm

Re: Example. Tip for show flags in your webpage.

Postby ralfmue » Wed Feb 04, 2009 8:45 am

This morning, the page showed up correctly. So I guess it was a cache problem. Alltougth for all other pages I never had trouble with the cache.
Your hints concerning wp-super-cache, storing the page, using different browser are usefull too. Whenever I run in trouble again, I'll remember that. Thanks!
ralfmue
 
Posts: 7
Joined: Mon Feb 02, 2009 5:11 pm

Re: Example. Tip for show flags in your webpage.

Postby Qian Qin » Fri Feb 06, 2009 1:04 am

interessting, is wp-super-cache working properly with qT now? Last time I tried it made all pages for different languages show up in the same one.
Qian Qin
Site Admin
 
Posts: 888
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: Example. Tip for show flags in your webpage.

Postby Corbacho » Sat Feb 07, 2009 10:46 am

Yes, it works fine for me. With Wp 2.7
Corbacho
 
Posts: 5
Joined: Wed Jan 28, 2009 9:15 pm

Re: Example. Tip for show flags in your webpage.

Postby vinha » Thu May 14, 2009 10:47 am

Qian Qin wrote:interessting, is wp-super-cache working properly with qT now? Last time I tried it made all pages for different languages show up in the same one.

No, qTranslate (2.3.4) and WP Super Cache (0.9.4.3) still don't work together properly.

Tested on IE6 and IE7:
Enable full supercache. Open any page without logging in to WordPress. Change language and then change it back. The new language stays on whatever you do.
In Firefox and Chrome it works fine, I don't know why. I'm using "Pre-Path Mode (Default, puts /en/ in front of URL)".

Half cache (legacy WP-Cache caching) can be enabled without any problems.

Greetings from Finland :)
vinha
 
Posts: 8
Joined: Mon May 11, 2009 12:58 pm

Re: Example. Tip for show flags in your webpage.

Postby Qian Qin » Sat May 16, 2009 9:58 am

too bad, i'd really like seeing super cache work with qT.
Qian Qin
Site Admin
 
Posts: 888
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: Example. Tip for show flags in your webpage.

Postby martin » Tue May 26, 2009 4:40 pm

Is this a possible solution for the wp-super cache problem?:

http://wordpress.org/support/topic/272260
qTranslate should use the "supercache_dir" filter rather than modifing the source code to modify that directory. You should contact the qtranslate plugin author to suggest he add a hook on that filter.
martin
 
Posts: 9
Joined: Tue May 05, 2009 1:48 pm

Re: Example. Tip for show flags in your webpage.

Postby MungoBBQ » Wed May 27, 2009 12:57 pm

vinha wrote:Enable full supercache. Open any page without logging in to WordPress. Change language and then change it back. The new language stays on whatever you do.
In Firefox and Chrome it works fine, I don't know why. I'm using "Pre-Path Mode (Default, puts /en/ in front of URL)".


I've solved the problem with WP Super Cache and qTranslate as such:

I changed a line of code in WP Super Cache to alter the URL getting cached to include the language prefix:

$uri = "/" . qtrans_getLanguage() . $uri;
MungoBBQ
 
Posts: 5
Joined: Wed Apr 29, 2009 2:24 pm

Next

Return to qTranslate Support Forum

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 7 guests