Same nice trick readding from database?

Having a question about translating phpBB3? Want to discuss and collaborate with people currently translating phpBB3? Here would be the correct place to do so.
Anti-Spam Guide
SourceSkyBoxer
Registered User
Posts: 10
Joined: Sun May 27, 2012 7:30 pm
Location: Germany
Name: Jens Eckervogt

Same nice trick readding from database?

Post by SourceSkyBoxer »

Helllo, folks,

i am trying for great way for current Language and readding mode from database.

I found good way for readding mode;
Look like this:
Readding mode goes into database - if you know for current grammar with current native language. :)

Code: Select all

"Hello" ','' 'how' 'are' 'you'  '?' => {TL_GRAMMAR_GREETING_QUESTION} {TL_LETTER_SYMBOL_COMMA} {TL_QUESTION_SMALL_HOW} {TL_PEP_BE_SMALL_YOU_NOTWO_ARE} {TL_PEP_YOU_PEP_NOTWO_YOU} {TL_LETTER_SYMBOL_QUESTION}
Loading Language into current native Language like simple function by phpBB3 with current Language English

Code: Select all

{TL_GRAMMAR_GREETING_QUESTION} {TL_LETTER_SYMBOL_COMMA} {TL_QUESTION_SMALL_HOW} {TL_PEP_BE_SMALL_YOU_NOTWO_ARE} {TL_PEP_YOU_PEP_NOTWO_YOU} {TL_LETTER_SYMBOL_QUESTION} => 'Hello' ',' 'how' 'are' 'you' '?'
Or on German Language ( DU == YOU-NO-TWO )

Code: Select all

{TL_GRAMMAR_GREETING_QUESTION} {TL_LETTER_SYMBOL_COMMA} {TL_QUESTION_SMALL_HOW} {TL_PEP_BE_SMALL_YOU_NOTWO_ARE} {TL_PEP_YOU_PEP_NOTWO_YOU} {TL_LETTER_SYMBOL_QUESTION} => 'Hallo' ',' 'wie' 'geht/'s' 'dir' '?'
Directory for languages and translators
/languages, here is your mother language or you have learnd current Language.
/tranlators, here is Put-Back like your current Language would like to convert to database description.

It is possible for long work because we need more words, verbs and more symbols for current language book. :(
If you would like to know about teach area.
Mathematics, native Language, Expertise and more... Irt is very important for "put-back" and "translate"

If you have good idea and get help for me. If you have leand about mathematics.
It is current for ara content or cubic content and more..

I write Frist line = English. 2nd Line: German

A = Area
F = Fläche

and more ...

Why do i need more currentg content for current Language because it looks like awesome "translatable" website. If you write same post than another folk reads your post with another Language. That is great way like funny magic plays on website. :D

That is not an april joke. I have written same translating files in directory translators. And i get same function into include for post, forum-Category and more. But it won't translate with Username or password :) Don't worry!

Thanks and i am working with Adobe Dreamweaver CS5.5 :)
SourceSkyBoxer
Registered User
Posts: 10
Joined: Sun May 27, 2012 7:30 pm
Location: Germany
Name: Jens Eckervogt

Re: Same nice trick readding from database?

Post by SourceSkyBoxer »

Hello guys,

i am developing with phpBB 3.11.

I have added more lines:
session.php: Add $trans, $trans_path, $trans_id and more

phpbb3/
trans/
en/
lb/ = Language Books
sg = Spells & grammars

and...
lang/
en/
lb/
sg/

From directory trans/
Look like this:
trans/en/lb/letter_a.php:

Code: Select all

<?php 
if (!defined('IN_PHPBB'))
{
	exit;
}

// lang_name = 'en'

// language book: A, a
if (empty($trans) || !is_array($trans))
{
	$trans = array();
}

$trans = array_merge($trans, array(

	'A' => 'TL_LETTER_BIG_A',
	'a' => 'TL_LETTER_SMALL_A',
	
	'A' => 'TL_A_FALL_BIG',
	'a'	=> 'TL_A_FALL_SMALL',
	'An' => 'TL_AN_FALL_BIG',
	'an' => 'TL_AN_FALL_SMALL',
	
	'AM' => 'TL_CLOCK_AM_BIG',
	'am' => 'TL_CLOCK_AM_SMALL',
	
	'At' => 'TL_TIME_AT_BIG',
	'at' => 'TL_TIME_AT_SMALL',
	
	// On Earth, countries and seas...
	'Africa' => 'TL_CONITE_AFRICA_BIG',
	'africa' => 'TL_CONITE_AFRICA_SMALL',
	
	'America' => 'TL_CONITE_AMERICA_BIG',
	'america' => 'TL_CONITE_AMERICA_SMALL',
	
	....	

));

?>
And from directory lang/
lang/en/lb/letter_a.php

Code: Select all

<?php
if (!defined('IN_PHPBB'))
{
	exit;
}

// lang_name = 'en'

// language book: A, a
if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

$lang = array_merge($lang, array(

	'TL_LETTER_BIG_A' => 'A',
	'TL_LETTER_SMALL_A' => 'a',
	
	'TL_A_FALL_BIG' => 'A',
	'TL_A_FALL_SMALL' => 'a',
	'TL_AN_FALL_BIG' => 'An',
	'TL_AN_FALL_SMALL' => 'an',
	
	'TL_CLOCK_AM_BIG' => 'AM',
	'TL_CLOCK_AM_SMALL' => 'am',
	
	'TL_TIME_AT_BIG' => 'At',
	'TL_TIME_AT_SMALL' => 'at',
	
	// On Earth, countries and seas...
	'TL_CONITE_AFRICA_BIG' => 'Africa',
	'TL_CONITE_AFRICA_SMALL' => 'africa',
	
	'TL_CONITE_AMERICA_BIG' => 'America',
	'TL_CONITE_AMERICA_SMALL' => 'america',
	
	....
	
));

?>
If you like this translatable website :)

Who come from Germany and write same post with Language German than you can not understand another Language. That is so stupid. I am trying a nice solution for translatable website.

Solution:
If an user comes from Germany or from Japan and writes post with current Language than you haven't problem for translatable current Language into English and you read current post ->

That is an awewsome trick by database / SQL Structure :D

Telling about for same pictures - if you understand picture better?
Step 1: German Version into Database symbol spelling!
Image

Step 2: Convert Language into database Readding database table!
Image

Step 3. Read website ( common.php and function.php ) and find current converted database table and convert back to current Language!
Image

Step 4: An user from United Kingdom reads with our post and understand yet.
Image


I hope you becasuse same people understand yet. :)

Thanks for suggestion...

Return to “[3.0.x] Translations”