Just check this out, this might give you an idea of what to do. Haven’t encountered this.
1) edit qtranslate_hooks.php and add this
Code: Select all
add_filter(‘get_bookmarks’, ‘qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage’,0);
2) Use [:de] etc. quicktags to build your link name.
Liza
That didn’t help.
But!
There is a little bit clarity in the problem.
I’ve found that when the language switched on to the secondary, sIFR tries to search SWF-files with fonts in the folder “http://blog.com/en/wp-content/themes/template_name/fonts/”. Obviously, there is no such folder ob the server, ’cause qTranslate generates string en/ dynamically.
In general, everything that i need is only to define the absolute path to the folder with my SWF-files somewhere in the sIFR source files. But, I don’t know which file and in which line should I edit.
P.S. In the file “fonts.php” i’ve found these strings:
$plugin_dir = ABSPATH.'wp-content'.'/plugins'.'/wp-sifr/fonts/';
$template_dir = ABSPATH.'wp-content'. str_replace(get_bloginfo('wpurl').'/wp-content', '', get_bloginfo('template_directory').'/fonts/');
I think that this is what I need. Evidently, here ABSPATH — this is a string that contains everything that goes before “wp-content” in address bar. So this colud be for example “http://blog.com/” or “http://blog.com/en”, depending on situation. But when I tried to replace ABSPATH with constant string (http://blog.com/) I failed.
As a result, both languages stopped displaying and link to the SWF-file transformed to “http://blog.com/en/wp-contentwp-content/themes/template_name/fonts/”, — where as you can see the string “wp-content” duplicates.
Really, does anybody know the solution?
KS
(@karl19)
Hi there,
I would suggest using bloginfo to link to your files. You can reach various parts of the folder structure, such as root, template directory and so on. Using something like this in your header.php should work:
<script src="<?php echo bloginfo('template_url'); ?>/js/your-sifr-file.js" type="text/javascript"></script>
Give that a go and see how you get on.
KS
(@karl19)
The above would give you:
<script src="http://www.your-site.com/wp-content/themes/your-theme/js/your-sifr-file.js" type="text/javascript"></script>
Hey thanks for the help karl! it worked perfectly
cheers
not so perfectly, it only worked in the index page of every language but not in my other pages 🙁