|
Posted by John Dunlop on 11/18/69 11:44
ivanfernandez80@gmail.com:
> I have the following questions :
>
> 1) Wanted to auto detect the users country
'User's country' is vague and wants elaborated. For example, it
could reasonably be taken to mean the country in which the user was
born and brought up, if such a country exists. More likely, you mean
the country the request originated from, which you might assume
corresponds to the country the user is currently in.
> and accordingly set the starting currency (from this currency) to the
> currency that his country is using.
More than one currency might be in use in any one country.
> And also change the language to the user's language ...
'User's language' implies that there is only one language that a user
considers to be their language. Not necessarily true.
How about leaving the server to negotiate the initial language based
on the user's Accept-Language header and provide links to translations
or versions in other languages? This way, the user gets their
preferred language (at least the language their browser asserts to be
their preferred language), and they still have the opportunity to
change language.
> 2)lets say that I have users from two countries Germany and Hungary I
> can create two starting web pages one with Hungarian and one with
> German
(You're conflating countries and languages. They are distinct; look
at Papua New Guinea.)
> ..but lets say I have users from 30 different countries is not
> very convenient to have to create a web page for each language there
> must be a way that someone can i have a webpage that takes textiles or
> something with the language strings and just displays them.
How about a template that pulls content from somewhere (e.g., a
database), that content depending on the user's preferred language?
> 3) Lets say that the language is wrong and the user is using a computer
> of the Spanish person and the user is Japanese I want to give them the
> option to change the language at any time
Links provide that option.
> ..do they have to install another language e.g Japanese in this case?
So long as there is a font installed that contains the glyphs needed,
and there is support for the particular character encoding, everything
should run smoothly.
To take your example of Spanish and Japanese, it depends how the
Japanese is written. If the user has a font containing glyphs for
Spanish, it is reasonable to assume that that same font contains glyphs
for romaji. That assumption does not carry over to kanji, hiragana, or
katakana. Depending on the content, there could be a mixture of all
those writing systems.
> or only the encoding has to be changed .?
If you use UTF-8 across the board, there's nothing to worry about.
To accomodate those who prefer Shift_JIS or some other character
encoding, you could have underlying character encoding switching, as
well as language negotiation, based on the user's Accept-Charset
header.
[snipped the rest]
--
Jock
[Back to original message]
|