NYCPHP Meetup

NYPHP.org

[nycphp-talk] Please review this: Simple localization with PHP

Jaz-Michael King JMKing at ipro.org
Fri Dec 20 09:21:21 EST 2002


Hey Emm, great article, easy to get through and well thought-out, well structured.

Here's some editing for you, just some minor polishing. (Ton anglais, c'est beaucoup mieux que mon francais ;-)

Je crois c'est mieux si tu fait les changes, comme ca j'espere tu peut voir les subtleties. 

You should consider publishing this on Evolt.org.

edits:

which could be easily turned in a template.
becomes
which could be easily turned into a template.

where you don't need to display a big amount of content, as the login page example
becomes
where you don't need to display a large amount of content, such as (our|my) login page example

The setstring function is easy to manage, it use session variables
becomes
The setstring function is easy to manage, it uses session variables

I'll explain it in details after the setstring listing.
becomes
I'll explain it in detail after the setstring listing.

The value of the $defaultlanguage is for new comers
becomes
The value of the $defaultlanguage is for newcomers

The value of the default language can be anything, as the names of the languages.
becomes
The value of the default language can be anything.

You set to 1 $use_cookie if you want your 
becomes
Set $use_cookie to 1 if you want your

You set $expirecookie to the number of seconds 
becomes
Set $expirecookie to the number of seconds 

he language which the function return is determined by order of priority
becomes
he language which the function returns is determined by order of priority

Which will look after the PHP processing:
becomes
Which, after PHP (outputs|processes) it, should look like:

This was set in (1) if the user have clicked on a link
becomes
This was set in (1) if the user has clicked on a link

When the $lang keyword is found, setstring loop in the array that was pass to it (lines: 65-75) and return the element after the value of the $lang which is the $string parameter.
becomes
When the $lang keyword is found, setstring loops through the array that was passed to it (lines: 65-75) and returns the element after the value of the $lang which is the $string parameter.

If you have repetive text
becomes
If you have repetitive text

Cheers
Jaz



>>> emm at scriptdigital.com 12/19/02 03:57PM >>>
Hello,

If you have time, please review this article called 'Simple 
Localization with PHP'.
<http://scriptdigital.com/divers/phplocalization.html>

English is not my prime language, so if you note anything that could 
be better said, please tell me. Also, any advice to improve this 
article is welcome.

TIA

Cheers
-Emmanuel
-- 
______________________________________________________________________
Emmanuel Décarie / Programmation pour le Web - Programming for the Web
Frontier - Perl - PHP - Javascript - XML  <http://scriptdigital.com/>



--- Unsubscribe at http://nyphp.org/list/ ---







More information about the talk mailing list