MintBooble Posted September 19, 2009 at 04:59 PM Report Share #287818 Posted September 19, 2009 at 04:59 PM Ei pessoal Precisava de saber como alterar a linguagem da pagina para inglês, neste caso. A página foi escrita em português, e queria ter a opção de poderem alterar a linguagem para inglês. Tenho duas pequenas bandeiras na barra, e quando clicarem nelas mudar para a linguagem da bandeira onde clicaram. Digam algo. 😄 Abraço Link to comment Share on other sites More sharing options...
IceBrain Posted September 19, 2009 at 05:06 PM Report Share #287819 Posted September 19, 2009 at 05:06 PM O site é estático ou dinâmico, ou seja, usa linguagens de programação no servidor? Se não usar, o melhor é teres duas versões do site, em directorias diferentes, e as bandeiras serem simples links para cada uma das versões. Se usar, isso deve ser feito usando templates. ❝The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.❞- John Carmack on software patents A list of command line apps Link to comment Share on other sites More sharing options...
MintBooble Posted September 19, 2009 at 05:28 PM Author Report Share #287821 Posted September 19, 2009 at 05:28 PM O site é estático ou dinâmico, ou seja, usa linguagens de programação no servidor? Se não usar, o melhor é teres duas versões do site, em directorias diferentes, e as bandeiras serem simples links para cada uma das versões. Se usar, isso deve ser feito usando templates. Estou a programar em PHP... Eu vi à uns tempos como fazer isto pelo javascript, mas agora não encontro. :/ Link to comment Share on other sites More sharing options...
Guest id194 Posted September 19, 2009 at 08:01 PM Report Share #287859 Posted September 19, 2009 at 08:01 PM Fazeres isso por javascript, que me venha assim à cabeça, tens duas hipóteses... Uma implica carregares as strings necessárias na outra língua e manualmente associar cada uma delas a cada elemento respectivo no site, ou seja, uma carga de trabalhos. A outra é teres um script no lado do servidor que dependendo de uma variável gera o código HTML todo correspondente à linguagem, depois é só substituir a página actual com o novo conteúdo. Link to comment Share on other sites More sharing options...
IceBrain Posted September 19, 2009 at 09:41 PM Report Share #287875 Posted September 19, 2009 at 09:41 PM Essa segunda solução são templates 😄 ❝The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.❞- John Carmack on software patents A list of command line apps Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now