1 benasplentas Jun 18, 2009 15:08
3 benasplentas Jun 18, 2009 16:07
Hi
thanks, found the switching on and off parts of code in index.main.php:
<?php
$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
?>
<?php
locale_restore_previous(); // Restore previous locale (Blog locale)
?>
But when I'm adding it to my static page, it comes with a message:
Fatal error: Call to a member function locale_temp_switch() on a non-object in /home/stent/domains/navis.lt/public_html/stultifera/skins/custom/_about.laivas.php on line 9
The line 9 contains:
$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
any ideas what's wrong, or why it is so?
Ben
4 edb Jun 18, 2009 16:13
Okay my bad. I took a totally random guess which was obviously wrong.
The problem with my guess is that there is no item for it to find the locale of ... and heck I'm not even sure why I think it would matter. Is your blog's main locale a UTF-8 locale? Oh and your locale in your profile. The thing is "locale" first uses the installation's locale, then the user's locale, then finally the post's locale for all the "localizable" bits.
Check that your Global Settings -> regional subtab shows your locale as something using UTF-8. Then check each blog's Blog settings -> general subtab for the same locale, then finally your profile under the Users tab.
This, by the way, is a more carefully constructed guess.
5 benasplentas Jun 18, 2009 16:30
Well, I've tried all that and all that's correct. I guess you were right in the first answer just the question is where and what should be added to these pages.
you see, the other parts of the pages - the posts, the comments are in correct encoding. So there should be something with exactly these pages. I gues...
6 yabba Jun 18, 2009 18:21
Might be worth checking your default locale, blog locale, post locale and user locale in admin area ;)
¥
7 benasplentas Jun 18, 2009 18:29
2Yabba: I've done everything. Just how to check post locale?
Ben
8 yabba Jun 19, 2009 08:42
Default Locale : admin > global settings > locales
User Locale : admin > users > [user]
Blog Locale : admin > blog settings > general
Post Locale : admin > write
It's more likely to be one of the first 3 as post locale only affects your actual post
¥
9 benasplentas Jun 19, 2009 15:00
Hello,
well, all four locales are the same - LT (Lithaunian). The only place where I don't have encoding is these static pages...
there should be something with the file itself, or am I wrong?
10 edb Jun 19, 2009 15:11
@¥åßßå: what about the database encoding? Given that all user-settable bits are in the correct locale is it possible that the database is the culprit in not displaying this correctly?
11 yabba Jun 19, 2009 15:14
I wouldn't have thought so ... more chance of the file not being saved as UTF-8 .... now there's a thought ;)
¥
12 benasplentas Jun 19, 2009 15:33
Goddamit! :)))) I'm sorry guys, that was the most stupid mistake I've ever made :)
The files - all of them - are saved in ANSI...
13 edb Jun 19, 2009 15:37
I was gonna suggest that but wanted to give ¥åßßå a chance to get one right :roll:
14 yabba Jun 19, 2009 15:49
BenasPlentas wrote:
Goddamit! :))))
Muppet :P
EdB wrote:
I was gonna suggest that but wanted to give ¥åßßå a chance to get one right :roll:
*salutes* thank you for the great opportunity Sir :D
¥
In your index or posts or single or page.main.php file look for a little bit that says something like "change_post_locale_temp()" or something like that. Typically there is a comment saying it is changing the locale for the current post. There will also be a thing saying it is changing it back after the "post loop" completes each post. I'm only guessing here, but maybe you might need that before (and after) the content of each of your custom pages.