rejetto forum

tpl localisation

rejetto · 22 · 16451

0 Members and 1 Guest are viewing this topic.

Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
basically, be able to load strings for [special:strings] from more then one file.

Edit: Just thought I'd try what I was asking and it worked but because you have to use {{load}} in [special:begin] at the top of the page the contents of the [special:string] sections that were loaded are displayed.

Edit2: Actually it didn't work, the special:strings were cached and a restart of hfs proved this. I'm trying to find the forum post which explains about loading them from external files. Found the post and using Load from special:begin isnt working for me as I said above.
A picture can explain better than i can. PICTURE
« Last Edit: December 27, 2007, 06:11:15 AM by Foggy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i may create a macro M (we'll decide the name later) that can handle string tables like these.

so you load any table
{{set|mytable|{{load|tablefile.txt}}/set}}

you can even append tables at later time
{{set|mytable|{{^mytable}} {{load|othertable.txt}}/set}}

and when you need a value from the table
{{M|mytable|key}}


opinions?


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
I like it, it will make it easier to use dynamic content becuase we would be able to load certain strings when a certain condition exists.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Don't forget to add a macro with this possiblity

{{M|mytable| [sectionname] }}wich include all the section [sectionname]

this syntax  [...] is important to make difference with 'key'

{{M|mytable| [sectionname] }} or  {{M section|mytable|sectionname}}

 I know what rejetto will say to me :
"who needs this ?"

;D ;D ;D


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
the M macro has been called "from table".
as you guess, "from table" has nothing to do with the feature you asking.
moreover, it is already available since build #161. it is {{section|name|file}} but i forgot to document it. :)
« Last Edit: January 05, 2008, 03:32:37 PM by rejetto »


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
is already available since build #161. it is {{section|name|file}} but i forgot to document it. :)

I just tried to use this and couldnt figure out how to. I ended up using set and from table instead.