Translation

  • SB
  • Moderator
  • Genius
  • User avatar
  • Joined: Nov 16, 2004
  • Posts: 7332
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post June 25th, 2008, 7:13 am

Does anyone know to change the language from Spanish? :lol:

I am joking. I was thinking, for those of us who might have accidently checked a language and would like to go back to English or another language would it maybe be possible in the "Control Panel" to have an English translation in smaller text below the current translated text.

I'm thinking along the lines for the future when languages such as Chinese and Japanese will be included (if it ever does) as this could be a little bit more difficult in restoring the language.

Now, is it "Guardar" or "Enviar" for Submit? :lol:
SB's Flickr
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 25th, 2008, 7:13 am

  • joebert
  • Weathered
  • Genius
  • User avatar
  • Joined: Feb 10, 2004
  • Posts: 11817
  • Loc: Clearwater, FL
  • Status: Offline

Post June 25th, 2008, 8:32 am

Another thing that could be cool, is if the visitors Accept-Language HTTP header was checked and if that language was different than the current language the option for that language from the new "Other languages" section in the sidebar could be added to the top navigation in the form of a question.

Like
... Members >> Register >> Contact >> Español ?
Why yes, yes I am.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22454
  • Loc: Pittsburgh PA
  • Status: Online

Post June 25th, 2008, 9:01 am

Enviar

*hint. It's in the same order as it is in English. Reset is on the left, and Submit is on the right.
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 7321
  • Loc: Seattle, WA
  • Status: Offline

Post June 25th, 2008, 9:40 am

joebert wrote:
Another thing that could be cool, is if the visitors Accept-Language HTTP header was checked and if that language was different than the current language the option for that language from the new "Other languages" section in the sidebar could be added to the top navigation in the form of a question.

Like
... Members >> Register >> Contact >> Español ?


phpBB does have the accept-language header check built in, but it its currently disabled in the session.php file:

Code: [ Download ] [ Select ]
            /**
            * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language
            * If re-enabled we need to make sure only those languages installed are checked
            * Commented out so we do not loose the code.


            if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
            {
                $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);

                foreach ($accept_lang_ary as $accept_lang)
                {
                    // Set correct format ... guess full xx_YY form
                    $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
                    $accept_lang = basename($accept_lang);

                    if (file_exists($phpbb_root_path . 'language/' . $accept_lang . "/common.$phpEx"))
                    {
                        $this->lang_name = $config['default_lang'] = $accept_lang;
                        $this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
                        break;
                    }
                    else
                    {
                        // No match on xx_YY so try xx
                        $accept_lang = substr($accept_lang, 0, 2);
                        $accept_lang = basename($accept_lang);

                        if (file_exists($phpbb_root_path . 'language/' . $accept_lang . "/common.$phpEx"))
                        {
                            $this->lang_name = $config['default_lang'] = $accept_lang;
                            $this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
                            break;
                        }
                    }
                }
            }
            */
  1.             /**
  2.             * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language
  3.             * If re-enabled we need to make sure only those languages installed are checked
  4.             * Commented out so we do not loose the code.
  5.             if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
  6.             {
  7.                 $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
  8.                 foreach ($accept_lang_ary as $accept_lang)
  9.                 {
  10.                     // Set correct format ... guess full xx_YY form
  11.                     $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
  12.                     $accept_lang = basename($accept_lang);
  13.                     if (file_exists($phpbb_root_path . 'language/' . $accept_lang . "/common.$phpEx"))
  14.                     {
  15.                         $this->lang_name = $config['default_lang'] = $accept_lang;
  16.                         $this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
  17.                         break;
  18.                     }
  19.                     else
  20.                     {
  21.                         // No match on xx_YY so try xx
  22.                         $accept_lang = substr($accept_lang, 0, 2);
  23.                         $accept_lang = basename($accept_lang);
  24.                         if (file_exists($phpbb_root_path . 'language/' . $accept_lang . "/common.$phpEx"))
  25.                         {
  26.                             $this->lang_name = $config['default_lang'] = $accept_lang;
  27.                             $this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
  28.                             break;
  29.                         }
  30.                     }
  31.                 }
  32.             }
  33.             */


I haven't checked into why they have it disabled right now, but I could probably make a few modifications to their code to also have it redirect to the correct version of ozzu depending on their Accept-Language and their priority.
Ozzu Hosting - Want your website on a fast server like Ozzu?
Contact US for more information about our plans and rates
  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 2825
  • Loc: Richland, WA
  • Status: Offline

Post June 25th, 2008, 9:55 am

Quick question, when someone makes a post in another language does ozzu translate it to English before its put into the database? Or how does your system work?
College Taught Me - And we're not talking about the classes!
@travisperson
  • joebert
  • Weathered
  • Genius
  • User avatar
  • Joined: Feb 10, 2004
  • Posts: 11817
  • Loc: Clearwater, FL
  • Status: Offline

Post June 25th, 2008, 10:05 am

My only guess is that phpBB3 comes with English as the default and only language, there's no point of having language checks if there's only one language.

I don't know if Ozzus' server has the function, but this is a spiffy function by the looks of it.
http://www.php.net/manual/en/function.h ... nguage.php
Why yes, yes I am.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 7321
  • Loc: Seattle, WA
  • Status: Offline

Post June 25th, 2008, 10:11 am

SpooF wrote:
Quick question, when someone makes a post in another language does ozzu translate it to English before its put into the database? Or how does your system work?


At this time it does not translate back to English, I have thought about that though as it could start bringing in members posting in the wrong language.

My next plan is to implement a system so that members who have their language settings to a different language will make it so that their post will get translated to English first and stored in the DB. It would also cache their original post since it would be more correct then any translated version back. Hopefully I didn't lose you there.

Eventually with that system in place Ozzu will be like a global communicator that allows everyone to communicate with each other no matter what language they are typing in.
Ozzu Hosting - Want your website on a fast server like Ozzu?
Contact US for more information about our plans and rates

Post June 25th, 2008, 11:50 pm

That is incredibly awesome ...
RewriteEngine On

RewriteRule ^(awesome|excellent|extraordinary)$ RT
  • SB
  • Moderator
  • Genius
  • User avatar
  • Joined: Nov 16, 2004
  • Posts: 7332
  • Loc: Edinburgh, Scotland
  • Status: Offline

Post June 26th, 2008, 11:49 am

Never mind translations, could someone teach me English?

I've just re-read my original post here and it barely makes sense.
SB's Flickr

Post June 26th, 2008, 12:10 pm

SB wrote:
I apologies.

Nice SB ...
RewriteEngine On

RewriteRule ^(awesome|excellent|extraordinary)$ RT
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 7321
  • Loc: Seattle, WA
  • Status: Offline

Post June 30th, 2008, 9:01 am

SpooF wrote:
Quick question, when someone makes a post in another language does ozzu translate it to English before its put into the database? Or how does your system work?


It does this now. If someone has their language settings on the forum to something other than English, it will convert their post to English first for the English part of the DB.
Ozzu Hosting - Want your website on a fast server like Ozzu?
Contact US for more information about our plans and rates
  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1794
  • Loc: sinister passage
  • Status: Online

Post July 4th, 2008, 8:49 am

this is not easy job.

Very great job one can think of...
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?

Post Information

  • Total Posts in this topic: 12 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.