Forum:New Babel Template?

I looked through the Babel templates awhile ago and noticed that there were few standards keeping them together. Some used Wikitext tables, and some used HTML tables, some also didn't place users into categorys like they should, and none sorted themselves seperately from the list of users.

So I'm trying out a new Babel template. The template uses parserfunctions and makes use of a single template using the first parameter for the language and the second parameter for the level. If a language code it dosen't understand is used it defaults to english, and the level when unknown defaults to native. The template is a little longer and less legable when reading the code of course because wikitext dosen't give as much whitespace freedom as normal programming languages do. But the coloring works with the current CSS classes on Wikia (Though I'm considering placing everything into a style section itsself so that the template can be cross-wiki linked from central without needing to mess with the CSS files.) I currently only have en-N0123 and fr-N added to the template for demonstration and to use the template here it would require the current slightly unorganized User language categorys to be set with proper standards on how they are setup. And we might need some users to help fill in all the missing babelboxes that currently don't have anything on them (e.g. I think while ther is a fr-N there is no fr-0123.) But I'm interested to see what people think of a cross-wikia babel which uses only a single template in a way that makes sure all the boxes work alike. The template is over at The Gaiapedia at w:c:gaia:Template:Babel, and I have a example showing it still looks like normal at w:c:gaia:Gaiapedia:Sandbox. Dantman (Talk) 08:58, 8 February 2007 (UTC)

Good idea! A cross-wikia babel sounds very interesting --Ciencia Al Poder ¿Algo que decir? 17:43, 9 February 2007 (UTC)

I've moved it from it's location on the gaiapedia to the central wikia. It's at Template:Babel right now. I'm going to add 2 special paramaters to it now which will allow people to stop it from adding them to a category (For people who don't have the categorys on their wikia) and one which will cancel out the normal sizing and allow the box to fill an entire area. Dantman (Talk) 06:59, 11 February 2007 (UTC)
 * I've run into something unfortunate. It seams that parameters don't work when using a shared template. This does mean that we cant use  to include a babel template into all wikia. But what can be done, is to make a babel box work on any wikia with this system, someone simply places   into Template:Babel on their own wikia. Then after that, babel will work on their wikia in all languages which are in the template at that time. That means instead of copying dozens of templates into each wikia you want to use babel on, all you half to do is add   to one page in each one. Not only that, but if we ever upgrage the one on wikia with new languages, then all they half to do is replace the contents on their wikia with   and their babel box will be updated with all the new languages in the babel box. Still better than dozens of individual templates, don't you think? Dantman (Talk) 07:35, 11 February 2007 (UTC)

mmm i was going to copy the Template:Babel to the w:c:Dofus but them i saw some things: Demos removed correctly working now--Cizagna (Talk) 19:47, 25 April 2007 (UTC) like this:
 * Box and fonts looks bigger than the old ones (yeah with 175% size) not every one has a 1200 display to avoid bother people.
 * only has FR, DE & JA and its missing like a lot of templates (though for my personal use is english and spanish making it usless unless i personaly update it).
 * Hard for some one to update as info its a little bit scramble.

Could be change in like this This user {{Iso639|{{#switch:{{{2|}}}|0= (or understands it with considerable difficulties).|1|2|3| speaker.}}

thought the issue of my option is that every language has their own order of how should it display so also could become contradictory =/


 * Insufficient (for not saying none) instructions on how to use it (i had to read the code to see how to use it properly and what extra things it has).

Now seeing the huge list of languages that are contain in the Template:Iso639 that keeps been updated its huge and creating a single template to contain all that information makes me wonder server stress? and template capacity? --Cizagna (Talk) 18:24, 22 April 2007 (UTC)


 * The size can be fixed with a little tweaking of the styles. And as for the lack of text, I only added some cause people should add the others if they need them. There's to much for one user to just put them all in at once. ~Dantman{{sup|(talk)}} tricks Apr 22, 2007 {{sub|@}} 19:26 {{sup|(UTC)}}

Added some languages, i can't make the UR work correctly and it does not load in the html, also notice how the EN and EN-1 breaks? it has to do with the English word is after finishing the switch, check if you can find something to work around. Also corrected the styles to match MediaWiki:Common.css --Cizagna {{sup|(Talk)}} 23:50, 22 April 2007 (UTC)
 * Done, don't use &amp;nbsp;, if you put a then the whitespace between it and the text will also be outputted. For example  if 1 was set then Findthis would be outputted. If it was blank then Find that would be outputted. It appears to have even better results than expected because the de is has also started to display correctly (Even though it was only en that I edited 0_o? Perhaps I should... oh wait... nevermind... User Babel already has the few languages it needs, and it's styles are standardized with the classes from the other userboxes. Trying to alter the way it looks would ruin the entire goal of making a simpler standard system of building userboxes using my box type classes instead. ~Dantman{{sup|(talk)}} tricks  Apr 24, 2007 {{sub|@}} 04:48 {{sup|(UTC)}}
 *    creates a space? I wouldn't expect that. Also, I made some Swedish translations. – Smiddle 19:24, 24 April 2007 (UTC)
 * No, nowiki dosen't create a space, it prevents the parser from trimming the whitespace. Consider it a nonexistant character which is treated like a character. The parser trims whitespace off the ends of parserfunctions. So  Will always output Dothis or Dothat because the spaces on the outside of the text are trimmed out by the parser. But if you use   then the output will always be Do this or Do that because the nowiki which gives no actual output is treated like it's a character and because of that the outside spaces are still stripped, but the space in between the   and the text is not stripped. If you want a technical reason for this, when the parser passes through it takes all nowiki tags, saves the contents inside of them to an array, and then replaces that area of text with something like UNIQ-23f8u9834u54 (Note that a character which cannot be used legaly in XML is added in there to so that it's not possible to enter text which whould be replaced with something extra by that) because that text is there the trim function does not remove the space in between it and the normal text because it's only programmed to trim the whitespace off the left and right of the string. Then when the parser passes back through it replaces all those id's with the text it saved which was in between the nowiki tags. Because there was no text inside the nowiki tags that arbatrary string is replaced with nothing therfore not adding to the output but stopping some of the stuff from being trimmed. That's what that trick takes advantage of.
 * That trick also works with other things like whitespace:

{{#if:{{{a|}}}| {{!}}- {{!}} class="a" {{!}} A {{!}} {{{a}} {{!}}- {{!}} class="b" {{!}} B {{!}} {{{b}}
 * }}{{#if:{{{b|}}}|
 * }}
 * It's very handy in templates with optional rows. The fact that that nowiki is used allows the newline to only appear when the row actually shows up, which prevents extra p's from showing up when it isn't used. ~Dantman{{sup|(talk)}} tricks Apr 24, 2007 {{sub|@}} 19:41 {{sup|(UTC)}}
 * Now I get it. (Just testing so that I got it right: blah{{#if:YA RLY| test|test}} – Smiddle 19:59, 27 April 2007 (UTC)
 * =o interesting this nowiki trick... im curious in the japanese one i wonder if its correct the order of the characters, as 日本語 its in some before な and in some after.

{{Babel|ja|0}} {{Babel|ja|1}} {{Babel|ja|2}} {{Babel|ja|3}} {{Babel|ja|N}} --Cizagna {{sup|(Talk)}} 19:47, 25 April 2007 (UTC)