maandag 6 oktober 2008

Dynamically generating styles in code and localization

Today I ran into a stupid problem: For a company I am working on webparts that support localization. The styles are generated dynamically, depending on the amount of items to show in a table. When using the English regionsettings, everything worked fine, but when switching to another region, for example Dutch, whole my table was screwed up. After comparing the html source files by hand, the sources were completely the same!

Then I decided to use a tool, named winmerge (i love that tool!). That tool showed me that the styles that were generated, did differ! With the dutch region settings, the style that was generated for my cells, had a relative percentage with a "," in it, while in english it was a ".".

dutch: style="left:8,34%;"
english: style="left:8.34%;"

3 opmerkingen:

Gilles zei

Goede Tip Bas! Alles goed bij Giraffe? Ik heb vandaag mijn 70-541 gehaald bij BVO, en je moet je "about me" info nog aanpassen ;)

志易 zei

這麼好的部落格,以後看不到怎麼辦啊!!.................................................................

HighTricker zei

hightricker

Seo Expert

Seo

Digital Marketing Strategy

Roblox

Facebook Cars