[pmwiki-users] MultiLanguage and (:if:)/(:else:)/(:elseif:)
Clemens Gruber
cgruber at uni-osnabrueck.de
Fri Aug 17 12:42:46 CDT 2007
Ok, I have figured out, you do not need any elseif condition if you use
a default language:
$DefaultLanguages = array('en');
include_once("$FarmD/cookbook/multilanguage.php");
but in this case you don't have to use a empty language condition in the
wiki syntax, do _not_ this
(:if userlang en:)
English text.
(:if userlang de:)
(:if userlang fr:)
use only
(:if userlang en:)
English text.
Clemens
Clemens Gruber wrote:
> Hi Patrick,
>
> on http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/38853 you
> wrote:
>
>
>> Perhaps something like http://www.pmwiki.org/wiki/Test/IfElseIf ?
>>
>> I have a bit more testing to do with the implementation, but I think
>> I will likely release this capability in the next beta. At the
>> very least (:else:) will be available as a recipe (but I'm thinking
>> it may deserve to be in the core).
>>
>
>
> Is there a possibility to use somthing like this below. This are some
> proposals and I don't know what has been implemented. We use the latest
> stable version pmwiki-2.1.27. I can not switch to a beta version, some
> used recipes would not work. So I have -- with the current possibilities
> -- no chance to use a default text in a multi language enviroment.
>
> Best regards
> Clemens
>
>
>
>> I've been thinking we might do this with (:elseif:)/(:else:) clauses,
>> as in:
>>
>> (:if lang en:) English text
>> (:elseif lang fr:) French text
>> (:elseif lang de:) German text
>> (:else:) Default text
>> (:if:)
>>
>> Or, perhaps what we really want is a good old-fashioned "case" statement:
>>
>> (:case lang en:)
>> English text
>> (:case lang fr:)
>> French text
>> (:case lang de:)
>> German text
>> (:case default:)
>> Default text
>> (:caseend:)
>>
>> Then perhaps we just make (:lang ...:) into a shorthand for
>> (:case lang ...:), so then the author can write:
>>
>> Text common to all languages
>> (:lang en:)
>> English text
>> (:lang fr:)
>> French text
>> (:lang de:)
>> German text
>> (:lang other:)
>> Text for languages other than en, fr, de
>> (:langend:)
>> Text common to all languages
>>
>
> http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/38806
>
>
>
--
Clemens Gruber (Dipl.-Psychologe)
Zentrum fuer Informationsmanagement und
virtuelle Lehre der Universitaet Osnabrueck (virtUOS)
Schloss-Strasse 9, Raum E07, D-49074 Osnabrueck
E-Mail: cgruber at uni-osnabrueck.de
URL: http://www.virtuos.uni-osnabrueck.de
Telefon: (05 41) 969-6505 oder
(05 41) 969-6501 (Sekretariat)
Fax: (05 41) 969-16505
More information about the pmwiki-users
mailing list