Translation

  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

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:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

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 ?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Enviar

*hint. It's in the same order as it is in English. Reset is on the left, and Submit is on the right.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

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: [ 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.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

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?
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

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
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

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.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

That is incredibly awesome ...
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

Never mind translations, could someone teach me English?

I've just re-read my original post here and it barely makes sense.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

SB wrote:
I apologies.

Nice SB ...
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

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.
  • George L.
  • Bronze Member
  • Bronze Member
  • George L.
  • Posts: 2209
  • Loc: Malaysia

Post 3+ Months Ago

this is not easy job.

Very great job one can think of...

Post Information

  • Total Posts in this topic: 12 posts
  • Users browsing this forum: No registered users and 1 guest
  • 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
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.