Recent Topics

1 Aug 13, 2006 16:03    

I'm currently using B2evolution 1.8 "Summer Beta", and I am working on localising the blog into Traditional Chinese.

The problem I encountered is, although those items in the sidebar can be successfully localised, those in the "post body" part still remain unchanged (like "Categories", "Permalink", etc).

Is anyone kind enough to help me figure out the possible reason/solution?

My blog address is http://www.timexplorer.com and I've attached the edited PO file for investigation.

Many thanks for all your help in advance. :D

3 Aug 14, 2006 04:55

balupton wrote:

Try this;
http://forums.b2evolution.net//viewtopic.php?t=8433

Not sure wether it will help, but it will at least knock out one of the possible reasons...

Many thanks balupton, and I am going to try this out.

But I just wonder this maybe cannot help in my case because of 2 reasons:

1. As you can see from my blog, some translated text appeared successfully in my blog (on the sidebar), so I just wonder why those "categories", "permalink" etc just simply stay in English even i have translated them.

2. If I follow the instruction from the URL you suggested, that may cause another problem to me. Because as a Hong Kong-er, our pre-set locale in browser can be varied from people to people. For example, I always stick at using Traditional Chinese (TW) as my default locale, but some of my friends just simply use English (US), or Traditional Chinese (HK). So if I use the method you mentioned, some of my friends will just simply able to see the English (should be?) interface only.

Anyway really thanks for helping me. :lol:

===============================================

Just tried the method mentioned there, but it just simply make my blog ignore all localisation and display English menu instead (no matter what locale I set in my browser). So any other solution that can let me try? :?:

4 Aug 14, 2006 09:27

Hrmm, ok, undo that change then, as you want it to always use the blogs locale...

Umm, check your skin's .php files and make sure that they are using T_('permalink'); etc, to make sure they are trying to translate the text...

5 Aug 14, 2006 11:18

I guess you are correct this time. Here is some codes that is an example that cannot show the translated text successfully:

-----------------------------------
<div class="bSmallPrint">
<?php $Item->permanent_link(); ?>
<?php $Item->feedback_link( 'comments', ' &bull; ' ) // Link to comments ?>
<?php $Item->feedback_link( 'trackbacks', ' &bull; ' ) // Link to trackbacks ?>
<?php $Item->feedback_link( 'pingbacks', ' &bull; ' ) // Link to trackbacks ?>

<?php $Item->edit_link( ' &bull; ' ) // Link to backoffice for editing ?>

<?php $Item->trackback_rdf() // trackback autodiscovery information ?>
</div>
-----------------------------------

These codes will be rendered as those "Permalink • Leave a comment • Trackback (0) • Edit Edit..." at the end of each post. I guess they haven't set to use the localisation...

By the way my blog's skin is just modified based on Nifty Corners. So Nifty Corners should has the same problem then.

6 Aug 14, 2006 11:23

Ok then they should be translated, are you sure the local you are using has that text translated.

Oh btw, the .po, .pot files are not used by b2evolution, global.php (i think it is) is used instead, the .po/.pot files are used to create the translations, you can find more info on how the translations work here:
http://manual.b2evolution.net/Localization

So my guess is that it is not finding the text in your language, hence why it is using the english language.

You can see the translation is attempted with the following code:

	function get_permanent_link( $text = '#', $title = '#', $class = '' )
	{
		global $current_User, $baseurl;

		switch( $text )
		{
			case '#':
				$text = get_icon( 'permalink' ).T_('Permalink');
				break;

			case '#icon#':
				$text = get_icon( 'permalink' );
				break;

			case '#text#':
				$text = T_('Permalink');
				break;
		}

		if( $title == '#' ) $title = T_('Permanent link to this comment');

		$url = $this->get_permanent_url();

		// Display as link
		$r = '<a href="'.$url.'" title="'.$title.'"';
		if( !empty( $class ) ) $r .= ' class="'.$class.'"';
		$r .= '>'.$text.'</a>';

		return $r;
	}

7 Aug 14, 2006 11:57

I can promise that I have translated the respective .PO entries and extracted them into _global.php already.

So I think the best thing for me to do is to stay with English interface...

Many thanks for helping me, balupton. ;)


Form is loading...