Web Hosting Talk







View Full Version : i need tutorial to build language system like vbulletin


3okl
01-12-2010, 12:03 AM
Hello

i need tutorial to build language system like vbulletin

or anything like it.

M Bacon
01-12-2010, 02:26 AM
PHP and MYSQL is what VBulletin uses. You can learn more at http://php.net

mattle
01-12-2010, 09:52 AM
Hello

i need tutorial to build language system like vbulletin

or anything like it.

I'm not sure what you mena by a "language system", but if you're referring to localization, there's a good tutorial here: http://onlamp.com/pub/a/php/2002/11/28/php_i18n.html

3okl
01-12-2010, 02:23 PM
I'm not sure what you mena by a "language system", but if you're referring to localization, there's a good tutorial here: http://onlamp.com/pub/a/php/2002/11/28/php_i18n.html

i mean i want move all phrases from language file to database.

and get all i want like vBulletin

$vbphrase["test"];

will get this "test" value from database and print to screen.

Thanks

mattle
01-12-2010, 02:50 PM
I doubt you actually want to do a database access for every phrase on your web site. That's gonna add a lot of overhead.

The code that you've posted is accessing an associative array element...which is the same way recommended in the tutorial link I gave you.

3okl
01-13-2010, 01:12 AM
Thank you mattle

i found good way to do what i want with your help. :)

Thank you

pwalters09
01-13-2010, 01:45 AM
Use something like this in PHP

<?php

define("EXAMPLE_1","This is 1 example");
define("EXAMPLE_2","This is another example");
define("EXAMPLE_3_HTML","<a title='Example' href='example.php'>This is an example using HTML</a> inside the language definition");

?>

Then just include that file in every PHP page

For example:

<?php require 'language.php'; ?>

Then to output the language use:

<?php echo EXAMPLE_1; ?>
<?php echo EXAMPLE_2; ?>
<?php echo EXAMPLE_3_HTML; ?>

And so on... :)

3okl
01-13-2010, 02:01 AM
Use something like this in PHP

<?php

define("EXAMPLE_1","This is 1 example");
define("EXAMPLE_2","This is another example");
define("EXAMPLE_3_HTML","<a title='Example' href='example.php'>This is an example using HTML</a> inside the language definition");

?>

Then just include that file in every PHP page

For example:

<?php require 'language.php'; ?>

Then to output the language use:

<?php echo EXAMPLE_1; ?>
<?php echo EXAMPLE_2; ?>
<?php echo EXAMPLE_3_HTML; ?>

And so on... :)

i'm already have a language file.

but i want to build my phrases in my database.

i'm already find the way and succeed to do it in my script.

but i'm searching to know more.

Thank you pwalters09.
- - - - - - - - - - - - - - - - - -