You are here: Foswiki>Tasks Web>Item1926 (19 Aug 2010, ArthurClemens)Edit Attach

Item1926: To make the page display utf characters: LANG should use $Foswiki::cfg{Site}{Locale} if set

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component: I18N
Branches:
Reported By: ArthurClemens
Waiting For:
Last Change By: ArthurClemens
I am working on an international language application that must use utf-8. To my surprise Foswiki "just works" with utf8 (displaying characters), but only when I set %LANG% to $Foswiki::cfg{Site}{Locale}.

%LANG% is used in templates to set the HTML "lang" property. Unfortunately, this is not documented, so some plugin authors also use LANG (set to it or Deutsch).

Now I set it this way (in Main.SitePreferences):
  • Set LANG = en_US.utf8
but of course the templates should pick up the value set in $Foswiki::cfg{Site}{Locale}.

-- ArthurClemens - 16 Aug 2009

What happens if %LANG% is not set to $Foswiki::cfg{Site}{Locale} ? How does it break?

-- MichaelTempest - 27 Jun 2010

I have not seen anything break, but assuming that a LANG setting is needed for utf8, LANG should not be used in a different way. So for now it may be just documentation.

-- ArthurClemens - 15 Aug 2010

Great - setting state back to confirmed.

-- MichaelTempest - 19 Aug 2010

Added VarLANG topic.

-- ArthurClemens - 19 Aug 2010

ItemTemplate edit

Summary To make the page display utf characters: LANG should use $Foswiki::cfg{Site}{Locale} if set
ReportedBy ArthurClemens
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component I18N
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:bc69aea4e914
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r8 - 19 Aug 2010, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy