Thursday, March 6, 2008

Multilingua - multilanguage

Está quase quase pronto.

Os mais distraidos e que tem a lingua do browser definida como ingles (algures nas opções de internet) já repararam como é estranho o sitem de repentem ter começado a aparecer em ingles quando estava sempre em português.

No menu existe a opção de "opções de lingua". É uma página bastante feia mas que já funciona.

O objectivo, bastante ambicioso, é começar com 3 ou 4 linguas. Ainda vou na 2a mas até está a ser mais rápido do que eu esperava.

A minha vaidade que me levava sempre a dizer que ainda nao tinha alterado a base de dados foi-se. Desta vez a lingua deu mesmo cabo disto tudo!

Outra novidade tambem é a pequena descrição junto aos locais. Tambem vai aos poucos e já tambem em inglês. Podem ver aqui.

A rotina de load de fotos tambem vai ter de ser alterada para ter a lingua e deve de levar um bocado. Espero que continuem a gostar das fotos que estão aqui porque novas vai demorar mais um bocadinho.

Introduzi publicidade no site. Cliquem por lá quando alguma coisa vos interessar porque isso ajuda-me a pagar o alojamento que acabei de expandir porque atingi o limite de espaço e precisei de mais. Até agora ganhei 30c de dolar (ou seja.. 20 centimos de euro ou coisa assim lol).

obrigado a todos

----------------

Multilanguage is almost ready.
You may have notices that, suddenly, it started appearing in english. if you wish to change it to another (only portuguese working) you may go to "language options" and change the language of the website. It is a very simple and non-designed page but.. it works :)

I hope i can get to all the 4 or 5 languages that i'd like to get so i could make the website
as universal as possible.

I was always so full of myself when i was saying that the database was the unchanged from the beginning... well.... it's all torn apart with this language stuff lol.

I made some small descriptions of the places were the photos were taken. You can chak some example here.

I introduced advertising. Please click in some that interests you. The aim is not changing my car but paying the website. I made $0.30 so far lol.

I do remember the promise about the multilanguage website with masterpages but it will take some time to write althoug the changes to the code were quite simple.

The photo loading routine will be changed to incorporate language so it will take a bit to have new pics. hope you enjoy the present ones a bit more.

ty all

Sunday, February 17, 2008

Ena tanta coisa

A começar pelo que tenho no clipboard.

Aquele bonequinho "gayolas" que aparece na barra de endereços que que ajuda a identificar a pagina onde se está como "logo" chama-se favicon.ico e pode ser criado a partir de qualquer imagen neste site.

Quanto ao site:
- está a ser efectuada aos poucos e com alguma ajuda a migração para multilingua. Como arranjei uns amigos franceses e holandeses tambem estou à espera que essas linguas apareçam para alem do ingles. Vou tentar tambem fazer uma pagina de "ajuda" para que os visitantes que por cá passam possam dar o seu quinhão se assim o desejarem.
- está disponível uma página com os rss feeds que estão disponiveis. esta pagina já está bilingue e detecta a lingua do browser (ou a que foi escolhida) para apresentar os rss nessa lingua em primeiro lugar.
- o layout do site foi esticado para aparecer na janela inteira parecendo mais "arejado".



english bit :)

The "gay" icon in the address bar can be created almost automatically with this tool


Aboute the site:
- step by step the database and the webages are beying translated to other languages. I have several french and dutch friends tha will (at least in the beginning) help me. So french and dutch will appear in the website too. I'll try to make a webage to use the visitors good will in the translation project.
- there is a new page with the feeds available. this page is already translated in portuguese and english. it will show in 1st place the language you choose or the preferred language of the browser.
- the layout has been "cleanned" ans stretched to appear in the full screen

Thursday, January 3, 2008

bilingue! - multilanguage

Bem, de facto é fácil. Ou melhor.... não é complicado

Num futuro post e até "amadurecer" a ideia irei mostrar o bocadito insignificante de código que faz isso.

A ideia é criar labels e na property "text" chamar um resource file que tem o código da lingua no nome.

i.e.
linguasafotografia.nl.resx para holandes
linguasafotografia.en.resx para inglês
linguasafotografia.pt.resx para português
linguasafotografia.pt-br.resx para português do Brasil
linguasafotografia.resx para um browser que nao diga que lingua prefere

links que ajudaram e muito!

este para começo, foi o primeiro que li
depois a coisa nao funcionava e dei mais umas piscinas porque estou a usar o WebDeveloper express que nao tem aquela opção

este lista os http-headers
porque às tantas tinha dúvidas se os browsers se estavam a portar bem já que isto mostrava sempre a lingua inglesa embora o meu default fosse português

este golbal.asax foi essencial
para a resolução do problema. No arranque da "aplication" a "thread culture" é logo inicializada com a do browser fazendo to o resto funcionar

aqui está a lista de culturas ISO que se podem usar


Com os testes que andei a fazer coloquei o meu firefox em NL e acabei de descobrir que, peo menos, as mensagens de autosave do post tambem são multilingue.


--------------------

Well, it is easy.. or... its not one astonishing achievement

In some future postas and after some reflection on this thing i'll do a post withh all the code stuff.

The basic ideia is binding the text property of a label (or whatever you want) to a resource file

i.e.
linguasafotografia.nl.resx for dutch
linguasafotografia.en.resx for english
linguasafotografia.pt.resx for portuguese
linguasafotografia.pt-br.resx for brazilian portuguese
linguasafotografia.resx for a default language (browser default)

really helpfull liks

ethis one was for a start
then it didnt work out and i had to swim a lot a try to look at everythink and WebDeveloper express does not have that "build resource language" option

for http-headers listing
after some testing i had doubts of what was the preferred language of my browser cause it was always showing english tough my default was portuguese

this golbal.asax solved it
when the "aplication" starts the "thread culture" is assigned to the browsers language and that made it

list of cultures and languages around the world in ISO format


with all the testing and while writing this post i just found out that google gives messages acording to the language set up in browser too :)