HighDots Forums  

CSS Localization

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS Localization in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shapper
 
Posts: n/a

Default CSS Localization - 03-19-2009 , 09:59 PM






Hello,

Sometimes CSS uses images that might need to have different versions
according to the current site culture.

What is the best way to create a web site CSS localization?

Is there other way then creating full duplicates for the CSS files?

Thanks,
Miguel

Reply With Quote
  #2  
Old   
C A Upsdell
 
Posts: n/a

Default Re: CSS Localization - 03-19-2009 , 10:13 PM






shapper wrote:
Quote:
Hello,

Sometimes CSS uses images that might need to have different versions
according to the current site culture.

What is the best way to create a web site CSS localization?

Is there other way then creating full duplicates for the CSS files?
You can have a main stylesheet, used for everyone, then a small
secondary stylesheet for each locale.



Reply With Quote
  #3  
Old   
Andy Dingley
 
Posts: n/a

Default Re: CSS Localization - 03-20-2009 , 07:22 AM



On 20 Mar, 01:59, shapper <mdmo... (AT) gmail (DOT) com> wrote:

Quote:
Sometimes CSS uses images that might need to have different versions
according to the current site culture.
Godd question!

Just this morning I'm faced with turning a page that normally uses
some random mix of serif / sans-serif (no specific font-family needed
or specified) into something that forces "Arial Unicode MS" (it's
intranet, so the browsers will have it) so that the Chinese glyphs
will be available. I only need to do this for some sessions from the
same web app (i.e. those requesting Chinese - anyone else can keep
their serifs), and there's language markup in the HTML document root
to indicate this.
http://www.w3.org/TR/html4/struct/dirlang.html#adef-lang

CSS 2.1 gives well-behaved selectors that can use this specific
language markup
http://www.w3.org/TR/CSS21/selector.html#lang

or you can busk it, using the generalized attribute selectors
http://www.w3.org/TR/CSS21/selector.html#matching-attrs


Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: CSS Localization - 03-20-2009 , 03:33 PM



shapper wrote:

Quote:
Sometimes CSS uses images that might need to have different versions
according to the current site culture.
The question is far too vague for a rational analysis.

Quote:
What is the best way to create a web site CSS localization?
The best way is "don't". CSS should not be used as the primary tool to
localization, as loacalization is about (textual) content and only
marginally about visual rendering.

Quote:
Is there other way then creating full duplicates for the CSS files?
Parse that sentence does not. I can do s/then/than/, but I cannot substitute
meaningful substitutes for the meaning.

--
Yucca, http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #5  
Old   
shapper
 
Posts: n/a

Default Re: CSS Localization - 03-20-2009 , 06:27 PM



On 20 Mar, 19:33, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:
Quote:
shapper wrote:
Sometimes CSS uses images that might need to have different versions
according to the current site culture.

The question is far too vague for a rational analysis.

What is the best way to create a web site CSS localization?

The best way is "don't". CSS should not be used as the primary tool to
localization, as loacalization is about (textual) content and only
marginally about visual rendering.

Is there other way then creating full duplicates for the CSS files?

Parse that sentence does not. I can do s/then/than/, but I cannot substitute
meaningful substitutes for the meaning.

--
Yucca,http://www.cs.tut.fi/~jkorpela/
Yucca,

I know that CSS is not the primary tool for localization.
But one of the situations I can see is a background image that
contains text and this image must have a different version for each
culture ...

On when a menu is using images through CSS (I am not using this) and
it must be lozalized ...

This are some of the examples that I can think of ...

Thanks,
Miguel


Reply With Quote
  #6  
Old   
Jeff
 
Posts: n/a

Default Re: CSS Localization - 03-20-2009 , 06:46 PM



shapper wrote:
Quote:
On 20 Mar, 19:33, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:
shapper wrote:
Sometimes CSS uses images that might need to have different versions
according to the current site culture.
The question is far too vague for a rational analysis.

What is the best way to create a web site CSS localization?
The best way is "don't". CSS should not be used as the primary tool to
localization, as loacalization is about (textual) content and only
marginally about visual rendering.

Is there other way then creating full duplicates for the CSS files?
Parse that sentence does not. I can do s/then/than/, but I cannot substitute
meaningful substitutes for the meaning.

--
Yucca,http://www.cs.tut.fi/~jkorpela/

Yucca,

I know that CSS is not the primary tool for localization.
But one of the situations I can see is a background image that
contains text and this image must have a different version for each
culture ...
Sometimes you need different styles on particular pages.

What I usually do is set a body id:

<body id="some_language"

then override the existing styles by styling as descendent's of

#some_language #navigation_list{

That way there is only one stylesheet and you can group the special
styles under the normal styles for your bits. Everything in one place.

But I've been pushing descendents for some time...

None of this is an endorsement of CSS localization, of which I know
little.

Jeff

Quote:
On when a menu is using images through CSS (I am not using this) and
it must be lozalized ...

This are some of the examples that I can think of ...

Thanks,
Miguel

Reply With Quote
  #7  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: CSS Localization - 03-20-2009 , 07:49 PM



shapper wrote:

Quote:
I know that CSS is not the primary tool for localization.
It's nothing of the kind. Your statement is like saying "I know that a
hammer is not the primary tool for curing cancer".

Quote:
But one of the situations I can see is a background image that
contains text and this image must have a different version for each
culture ...
So what was the decision that made you use a background image for the
purpose, thereby destroying localization
a) whenever CSS is off OR
b) images are not loaded OR
c) images are not shown e.g. in print copies?

--
Yucca, http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #8  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: CSS Localization - 03-21-2009 , 05:54 AM



Jukka K. Korpela wrote:
Quote:
shapper wrote:

I know that CSS is not the primary tool for localization.

It's nothing of the kind. Your statement is like saying "I know that a
hammer is not the primary tool for curing cancer".
Everything presented to a user that should vary by locale, should be
localized, whether it comes from text within the HTML, it's part of an
image (such as a banner) that's inserted on the page via an IMG tag, or
it's a background-image in CSS. No one said anything about using CSS as
a "tool for localization", primary or otherwise. The OP *has* CSS, and
he needs to localize it, that's all.

Quote:
But one of the situations I can see is a background image that
contains text and this image must have a different version for each
culture ...

So what was the decision that made you use a background image for the
purpose, thereby destroying localization
a) whenever CSS is off OR
b) images are not loaded OR
c) images are not shown e.g. in print copies?
You've gone off on a tangent, about the issues involved in relying on
CSS for the UI. Even if the failure of something to be displayed is a
problem, that's a separate issue from the one of localizing it when it
is displayed.


Reply With Quote
  #9  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: CSS Localization - 03-21-2009 , 06:57 AM



Harlan Messinger wrote:
Quote:
Jukka K. Korpela wrote:
shapper wrote:

I know that CSS is not the primary tool for localization.

It's nothing of the kind. Your statement is like saying "I know that
a hammer is not the primary tool for curing cancer".

Everything presented to a user that should vary by locale,
That's an absurd idea. There is more than enough to be done with things that
need to be localized, so it's absurd to say that everything should be
localized. Besides, we don't know the user's locale; there is no way to
access it in HTML or in CSS. A locale is much more than just the language,
so it's better to speak of translations when you mean just translations.

Quote:
No one said anything about using
CSS as a "tool for localization", primary or otherwise.
Read what you quoted. Let me help you there... "CSS is not the primary tool
for localization". This implies the idea that CSS is a tool for
localization.

Quote:
You've gone off on a tangent,
It may look that way to you, but what's a tangent in your eyes might be the
main line of thought to someone else, and your curves are just distractions.

Quote:
about the issues involved in relying on
CSS for the UI.
That's very much an issue that belongs to the topic of this group.
Localization mostly doesn't, unless it has something real to do with CSS.
For example, if a page exists in different languages, it is relevant to ask
whether one can still use the same style sheet. (The correct answer to that
is fairly complex.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #10  
Old   
shapper
 
Posts: n/a

Default Re: CSS Localization - 03-22-2009 , 10:13 PM



On Mar 21, 10:57*am, "Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:
Quote:
Harlan Messinger wrote:
Jukka K. Korpela wrote:
shapper wrote:

I know that CSS is not the primary tool for localization.

It's nothing of the kind. Your statement is like saying "I know that
a hammer is not the primary tool for curing cancer".

Everything presented to a user that should vary by locale,

That's an absurd idea. There is more than enough to be done with things that
need to be localized, so it's absurd to say that everything should be
localized. Besides, we don't know the user's locale; there is no way to
access it in HTML or in CSS. A locale is much more than just the language,
so it's better to speak of translations when you mean just translations.

No one said anything about using
CSS as a "tool for localization", primary or otherwise.

Read what you quoted. Let me help you there... "CSS is not the primary tool
for localization". This implies the idea that CSS is a tool for
localization.

You've gone off on a tangent,

It may look that way to you, but what's a tangent in your eyes might be the
main line of thought to someone else, and your curves are just distractions.

about the issues involved in relying on
CSS for the UI.

That's very much an issue that belongs to the topic of this group.
Localization mostly doesn't, unless it has something real to do with CSS.
For example, if a page exists in different languages, it is relevant to ask
whether one can still use the same style sheet. (The correct answer to that
is fairly complex.)

--
Yucca,http://www.cs.tut.fi/~jkorpela/
Yucca,

1. I do localization on my server side code (C#) and on my SQL Server
database;
And I do it heavily ... I have web applications with more than 10
cultures.
Localization includes many issues and I am aware of them all ...

2. I can see, as I mentioned, situations where CSS can "insert" into a
page an element that could need localization.
a) A background image with some text ... seems a real situation or
not?
b) A menu using images ... seems a real situation to, right?

Even if it is not a localization tool ...

My questions is:

What do you (participants in this group) think a good approach for
localization would be?

I got two interesting options:
1. Body > I think this method is often used to give a different style
to the menu "button" of current page;
2. Have a separated CSS file that contains the localized styles. Seems
a good way ...

Yucca,

I think my question was simple, clear, fair and had some points ...

You just go completely off for no reasonable reason I can see ...

I think I am going for option 2.

Thanks,
Miguel


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.