Re: Multilingual site options?

Simon Rönnqvist <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general
Message-ID <[email protected]>
   Hi!

I tried something similar to what you suggested
In config.xml:
     <sitedescription_en allowFromDB="true">This is my Flux CMS Site</ 
sitedescription_en>
     <sitedescription_sv allowFromDB="true">Detta ar min Flux CMS  
Site</sitedescription_sv>
     <sitedescription_fi allowFromDB="true">Tama on Flux CMS  
sivustoni</sitedescription_fi>
(Couldn't btw. find out how to get umlaut characters accepted in the  
config.xml tags above.)

And then this in master.xsl:
     <xsl:variable name="sitedescription" select="php:functionString 
('bx_helpers_config::getOption',concat('sitedescription_',$lang))"/>

Then when I tried to add new dbform options I get the following (but  
I can change the names of existing variables though):
The given query was not valid in file /home/streng/www/inc/XML/ 
xml2db.php at line 226
[Last query: insert into bxcms_options (name, value, isarray, id)  
values ('sitedescription_en', 'trubadour, singer, entertainer &  
conferencier', '0', '13')] [Native code: 1062] [Native message:  
Duplicate entry '13' for key 1]
MDB2 Error: already exists

However, when I changed the sitedescription variable to  
sitedescription_fi I find another problem... all the scandinavian  
characters come out encoded on the webpage.
Or let's say ä comes out as &amp;#228; in the XHTML code and  
therefore the browser views &#228; instead of having it in the  
code... ;-)
(I remember some problem like this with the standard usage of  
sitename, etc. some time earlier on, but that one got fixed.)

Is it btw. possible to edit the standard site-options form so that  
one could add variables of one's own (and take away those which one  
doesn't want to let the customer touch), so that the customer  
wouldn't have to dig through the dbforms?

   cheers, Simon


On Sep 30, 2005, at 15:42, Christian Stocker wrote:

>
>
> On 30.9.2005 13:53 Uhr, Simon Rönnqvist wrote:
>
>>   Hi!
>>
>> Sorry if I keep bothering you with this... :-) But I didn't get any
>> answer to the mail below.
>> Now I'm starting to come to a point in a project of mine where I'd  
>> need
>> to find an alternative to the still non-existant multilingual
>> sitedescription functionality, unless it'll be implemented really  
>> soon.
>>
>
> No, there are no immediate plans by us to implement that "really soon"
> :) But it nevertheless is possible, see below for quite an easy  
> solution
> to that problem.
>
>
>> In case the multilingual sitedescription (or multilingual site  
>> options
>> in general) won't be implemented soon, then what would be the best
>> workaround for a multilingual sitedescription at this point? Of  
>> course
>> it doesn't even need to be the sitedescription variable, the most
>> important thing is just to have multilingual content in the <h2>- 
>> tag in
>> the #banner <div>. (But of course it'd be nice if the content of the
>> metatag also would be the same.)
>>
>
> in conf/config.xml add
>
> <config>
> <options>
> <sitename_de>Seitenname</sitename_de>
> <sitename_en>Sitename</sitename_en>
> ..
> </options>
> </config>
>
>
> and then in master.xsl
> replace
>
> <xsl:variable name="sitename"
> select="php:functionString 
> ('bx_helpers_config::getOption','sitename')"/>
>
> with
>
> <xsl:value-of
> select="php:functionString('bx_helpers_config::getOption',concat 
> ('sitename_',$lang))"/>
>
> that should do it, but I didn't test it :)
>
> Basically you can add any option you want to use in config.xml.
>
> chregu
>
>
>>
>>   cheers, Simon
>>
>>
>> Begin forwarded message:
>>
>>
>>> *From: *Simon Rönnqvist <[email protected] <mailto:[email protected]>>
>>> *Date: *September 15, 2005 00:39:55 GMT+03:00
>>> *To: *Christian Stocker <[email protected]  
>>> <mailto:[email protected]>>
>>> *Cc: *bitflux-cms-list List <[email protected]
>>> <mailto:[email protected]>>
>>> *Subject: **Re: [bitflux-cms] Multilingual site options?*
>>>
>>>
>>>   Hi!
>>>
>>> When do you suppose that this will be fixed?
>>> It says target milestone 1.4 when clicking the link below, that  
>>> sounds
>>> like quite a bit into the future.
>>>
>>> I'm just thinking since I'm making a multilingual personal homepage
>>> which sitedescription (at least) needs to be multilingual. So if  
>>> this
>>> isn't likely to be possible in the near future I just need to  
>>> solve it
>>> in some other way, otherwise I'll wait for it to be fixed.
>>>
>>>   cheers, Simon
>>>
>>>
>>> On Aug 14, 2005, at 13:51, Christian Stocker wrote:
>>>
>>>
>>>
>>>>
>>>>
>>>> On 13.8.2005 13:24 Uhr, Simon Rönnqvist wrote:
>>>>
>>>>
>>>>
>>>>>   Hi!
>>>>>
>>>>> It'd be nice is if one could use separate language versions in the
>>>>> site-options, at least the site- and blogdescriptions should be
>>>>> available in different languages, but why not the names and  
>>>>> maybe  some
>>>>> of the other info too.
>>>>>
>>>>>
>>>>>
>>>>
>>>> Yes, should be :)
>>>>
>>>> http://bugs.bitflux.ch/cgi-bin/bugzilla/show_bug.cgi?id=859
>>>>
>>>> chregu
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>>   cheers, Simon
>>>>> PS. Thankyou for the lenthy descriptions on the XSLT  
>>>>> templates,  etc...
>>>>> It could maybe even be included in the documentation.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004  
>>>> zurich
>>>> phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240  
>>>> 56 71
>>>> http://www.bitflux.ch  |  [email protected]  |  gnupg-keyid  
>>>> 0x5CE1DECB
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> bitflux-cms mailing list
>>> [email protected] <mailto:[email protected]>
>>> http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
>>>
>>>
>>
>>
>
> -- 
> christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
> phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
> http://www.bitflux.ch | [email protected] |  GPG 0x5CE1DECB
>

-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.