plainblack.com
Username Password
search
Bookmark and Share

MLlang - Display internationalized content

^MLlang ( <langAbbr_=_text> [_:_<langAbbr>_=_<text>]...
                      | <invalue><_#_|_M_>[<dictionary_category | fieldname=fieldvalue><_#_|_M_>[<infield><_#_|_M_>[<outfield><_#_|_M_>[<table>]]]] )

           Watch out for the delimiters:

           To decide for a text:
           1. _=_  is delimiter for lang => show value
           2. _:_  is delimiter for further languages

           To select a value from a table

           3. _#_    for all text
           4. _M_    for menuetext, without HTML-tags

More in included perldoc.

 

 

System Requirements
  • For showing alternative text, depending on session language:
    none
  • For use, based on predefined translations:
    Thingy table with special structure. (Can be adapted for other tables.
    See doc.
  • Enter
    "MLlang" : "MLlang",
    within the macro definitions of your config.
Release Notes for Version 10/2688 (10/8/2010)

03.02.10:

An updated version with a bit more perldoc, which explains how
to use the Macro, if you have a problem to generate the mentioned Thingy-table:

Use
                 ^MLlang(de_=_
                              Deutscher Text
                        _:_en_=_
                              English text
                        _:_nl_=_
                              Nederlandse tekst
                         );
for text to translate within your (multi-langual) articles

Use
                 ^MLlang(Testvalue_M_);

to translate your titles, menues etc. Do this in the templates, e.g.:

              <tmpl_if displayTitle>
                  <h1>^MLiflang(<tmpl_var title>_M_);</h1>
              </tmpl_if>

 

13.02.10/15.02.10/05.03.2010:

Minor bug changes

Comments
0martien: "An actual RFE (#11329) describes a change for Thingy, which helps to init the special Thingy-structure.

"
0martien: "Tip: To define the language to start with, coming to your site, you'll have to change the profile of the anonymous user "Login"."
DownloadMLlang.pm MLlang.pm
LinksMartien Lammers
No Support Offered
Statistics Downloads: 570
Views: 2389
Rating: 0
Updated: 10/8/2010
Keywords Internationalization language macro
NavigationMore from Martien Lammers
Back to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved