[PHP] Internationalization

2012-12-28 Thread Silvio Siefke
Hello,


i have found a good Tutorial about Internationalization from Websites
with PHP. That's sounds intresting. Has someone Tutorials which go
deeper in the subject. 

http://phpmaster.com/localizing-php-applications-1/

I has a website for that i need this in 3 languages. This sounds that
were a hard way, but a good way. 

Im were happy someone has Tutorials which go deeper.

Nice new Year, Thanks for help, Greetings
Silvio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] internationalization of web site

2006-04-13 Thread kmh496
i put the files in one place for you.
to do what you want.
http://www.sirfsup.com/code/php/i18n_php/http_server_encoding

2006-04-12 (수), 16:24 -0300, Martin Alterisio "El Hombre Gris" 쓰시길:
> Ussually, the browsers send a header with information about the language 
> preferences of the user.
> This header is HTTP_ACCEPT_LANGUAGE.
> You can retrieve its value in PHP through the array $_SERVER:
> $_SERVER['HTTP_ACCEPT_LANGUAGE']
> 
> Here you can find about the format of this header:
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
> 
> Alain Roger wrote:
> 
> >Hi,
> >
> >Sorry to send this email on both mailing lists but as i suppose that both
> >are concerned by it, i did.
> >
> >i would like to make my web site tune to user language.
> >for that i was thinking to create some XML files where all words can be
> >found and based on the icon (country flag) that user clicked, i will load a
> >specific XML file to tune my PHP pages.
> >
> >i know from Java exprience that it exists also another possibility via
> >browser setup for preference in language, but i do not know how it works in
> >PHP.
> >
> >please, could you give me some tips, helps, or tutorial for such request ?
> >
> >thanks a lot,
> >Alain
> >
> >  
> >
> 
-- 
my site http://www.myowndictionary.com";>myowndictionary was
made to help students of many languages learn them faster.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] internationalization of web site

2006-04-12 Thread Martin Alterisio \"El Hombre Gris\"
Ussually, the browsers send a header with information about the language 
preferences of the user.

This header is HTTP_ACCEPT_LANGUAGE.
You can retrieve its value in PHP through the array $_SERVER:
$_SERVER['HTTP_ACCEPT_LANGUAGE']

Here you can find about the format of this header:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4

Alain Roger wrote:


Hi,

Sorry to send this email on both mailing lists but as i suppose that both
are concerned by it, i did.

i would like to make my web site tune to user language.
for that i was thinking to create some XML files where all words can be
found and based on the icon (country flag) that user clicked, i will load a
specific XML file to tune my PHP pages.

i know from Java exprience that it exists also another possibility via
browser setup for preference in language, but i do not know how it works in
PHP.

please, could you give me some tips, helps, or tutorial for such request ?

thanks a lot,
Alain

 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] internationalization of web site

2006-04-11 Thread tedd

At 8:59 PM +0200 4/11/06, Alain Roger wrote:

i would like to make my web site tune to user language.
for that i was thinking to create some XML files where all words can be
found and based on the icon (country flag) that user clicked, i will load a
specific XML file to tune my PHP pages.


Why not just:

1. Allow the user to make their own selection of language -- like 
flags to set the language.


2. Then have different text includes to cover that specific language.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] internationalization of web site

2006-04-11 Thread Richard Lynch
On Tue, April 11, 2006 1:59 pm, Alain Roger wrote:
> Sorry to send this email on both mailing lists but as i suppose that
> both
> are concerned by it, i did.
>
> i would like to make my web site tune to user language.
> for that i was thinking to create some XML files where all words can
> be
> found and based on the icon (country flag) that user clicked, i will
> load a
> specific XML file to tune my PHP pages.
>
> i know from Java exprience that it exists also another possibility via
> browser setup for preference in language, but i do not know how it
> works in
> PHP.
>
> please, could you give me some tips, helps, or tutorial for such
> request ?

I'm not an expert, but...

I suspect that many users don't bother to set their browser
preferences for language in the first place.

Even if they do, you have to assume that they might choose to read in
a second language if they suspect the content/translation is better on
some pages.

So you'll probably need the little flags anyway.

And the browser-specficied language preference will probably be not
all that useful.

The PHP site seems to have a multi-lingual solution itself.  And
there's a source code link on every page to let you see how they do
it.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] internationalization of web site

2006-04-11 Thread Alain Roger
Hi,

Sorry to send this email on both mailing lists but as i suppose that both
are concerned by it, i did.

i would like to make my web site tune to user language.
for that i was thinking to create some XML files where all words can be
found and based on the icon (country flag) that user clicked, i will load a
specific XML file to tune my PHP pages.

i know from Java exprience that it exists also another possibility via
browser setup for preference in language, but i do not know how it works in
PHP.

please, could you give me some tips, helps, or tutorial for such request ?

thanks a lot,
Alain


[PHP] Internationalization performance

2004-02-18 Thread Arnout Standaert
Hi list,

I'm working on a not-so-big website (currently about 1,5MB without 
database files) that will receive not-too-much traffic (let's say 1000 
visitors a day, being optimistic here). It's supposed to be available in 
Dutch and in English. I want one version of the scripts/pages, loading 
language-specific content depending on the language setting in a cookie.
Now, I see two ways:
* store all content in a MySQL table, for the different languages
* use the include file approach

The question: how about performance? The include file seems the most 
attractive at first sight, querying a database on each page request 
sounds intensive. Then again, as the site grows bigger, language files 
will grow and HTML output might not be too fast anymore.

Has anyone got experience with both approaches, and how they scale?

Thanks in advance,
Wald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Internationalization

2002-07-30 Thread Jeb A. Scarbrough \(home\)

Can someone provide a good source of information on what PHP can and cannot
do in regards to making a site multi-lingual.  I've found a little
information about using gettext but that's about it.  Do you have to using a
certain charset?  Do all functions work with different languages? String
functions for example?

Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] internationalization and gettext

2002-06-13 Thread a . h . s . boy

I developed a rather large and extensive PHP application for maintaining 
a news publishing site. All static text was, when I created it, written 
in English. Form field labels, long explanatory texts, navigational 
links, everything. The popularity of the application, however, has 
drifted outside the Anglo boundaries, and now I need to internationalize 
the code to support other languages for text output and date formatting. 
(Localization I'll leave up to those better qualified). I'm looking for 
feedback on various methods of allowing easy localization.

The date formatting stuff is easy enough with built-in PHP functions. 
All my dates are instantiated as objects anyway, so output format is 
nicely encapsulated in class methods, making that part easy.

The manner of supporting localization of text strings, however, allows 
for a few more options. I've taken note of how a few different PHP apps 
have broached the topic:

-- phpMyAdmin. Minimal static text. Loads a localized text file 
containing localized variable assignments, and always puts out text by 
variable reference rather than hard-coded text.

-- FUDforum2. Fairly large quantity of text. Also uses a text file of 
variables and their localized value, but seems to have a more indirect 
manner of putting out the variable-based text. (Part of the apparent 
"indirection" is that perusing the code reveals TONS of hard-coded 
English phrases that don't seem to be localized. But I haven't actually 
seen, as a web user, the FUDforum2 operating in a non-English language, 
so I can't really vouch for whether all the text is internationalized or 
not).

-- The PHP Manual speaks highly of gettext() calls, relying on a 
standard, mature UNIX function to automatically handle 
internationalization. It sounded good, and I liked the idea of it 
leveraging the power of something that was _designed_ for 
internationalization, and not a "good hack job of variable 
substitutions" attempting the same functionality.

So I've begun the process of modifying all of my text output from

echo ("My English phrase dangles");
to
echo _("My English phrase dangles");

and the like. It's beautiful. 3 extra characters -- "_()" -- to wrap 
around strings, and poof! it's 90% of the way towards the United Nations.

I created a quick English string file of a few webpages worth of text, 
threw together a rough French translation, and tried viewing the site in 
French. Seemed to work wonderfully.

So, this far, I'm happy, and continuing to modify the code to 
internationalize the output. I'm only a bit wary, however, because it 
seems relatively easy, yet I haven't run into any PHP applications that 
have internationalized their interface in this way. (That doesn't mean 
there aren't any out there, but I haven't run into them). Are there any 
potential problems that I need to be aware of? Substantial performance 
hits? Bogeymen?

I'd love to hear success stories from anyone using gettext() with a 
substantial number of strings (like 500-1000).

Cheers,
spud.

---
a.h.s. boy
spud(at)nothingness.org"as yes is to if,love is to yes"
http://www.nothingness.org/
PGP Fingerprint: 7B5B 2E7A FA96 865A D9D9  5D6D 54CD D2C1 3429 56B4
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php