News:

Wondering if this will always be free?  See why free is better.

Main Menu

Language Tag

Started by Anguz, November 18, 2004, 06:24:10 PM

Previous topic - Next topic

Anguz

Link to Mod

Requires FasterParsecode to be installed first.
http://mods.simplemachines.org/index.php?mod=39
      
This mod adds a new bb code tag: [language][/language]. Inside this one you use pairs of tags for different languages and only the one the user is using will shown, ie: [language][english]hello[/english][spanish]hola[/spanish][/language].

Copyright 2004 by Cristian Lavaque. http://anguz.net
Cristián Lávaque http://cristianlavaque.com

FaSan


Anguz


[language]
[english]Good morning[/english]
[spanish]Buenos días[/spanish]
[japanese]おはようございます[/japanese]
[/language]
Cristián Lávaque http://cristianlavaque.com

A.M.A

Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

codenaught

Nice idea Anguz. This could come in handy.
Dev Consultant
Former SMF Doc Coordinator

Oldiesmann

This would be especially handy on forums with lots of bi-lingual members. Nice idea.
Michael Eshom
Christian Metal Fans

Anguz

Thanks guys. :D

I actually thought of this trying to come with a solution for a way to use topics as product pages where I needed the description to show in different languages. Having a board for each language would have been a bit more trouble for the updating.

I may make a little change to the parsing of this tag for the next version, because now if there's not a string for the language the person has chosen, then the whole block is left un-parsed. I'm not sure how to do it in that case, though, if not displaying anything at all, or defaulting to the forum's language, where it'll require at least that string to be present. Suggestions?
Cristián Lávaque http://cristianlavaque.com

Oldiesmann

I say if you can't figure out what language a person has chosen then use the forum default.
Michael Eshom
Christian Metal Fans

spiros

Can you use it so that board names and descriptions appear in different languages according to the language used?

Anguz

Quote from: spiros on December 27, 2004, 09:30:38 PM
Can you use it so that board names and descriptions appear in different languages according to the language used?

That the user can already choose from his profile out of the options you provide.
Cristián Lávaque http://cristianlavaque.com

Jerry

looks pretty neat anguz


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

spiros

No, the actual board names and their descriptions do not change with the language change.

Quote from: Anguz on December 27, 2004, 09:47:11 PM
Quote from: spiros on December 27, 2004, 09:30:38 PM
Can you use it so that board names and descriptions appear in different languages according to the language used?

That the user can already choose from his profile out of the options you provide.

Anguz

Ah, that's true... I don't remember if ubbcode gets parsed in those, if so, then this tag will work on them, otherwise I'm not sure. :-\
Cristián Lávaque http://cristianlavaque.com

spiros

I tried adding a tag but it was not parsed so I guess it does not work there....

Anguz

1.01


  • Updated for SMF 1.0.1
Cristián Lávaque http://cristianlavaque.com

Anguz

1.02


  • Updated for SMF 1.0.2.
Cristián Lávaque http://cristianlavaque.com

Anguz

1.03


  • Updated for SMF 1.0.3.
Cristián Lávaque http://cristianlavaque.com

stargazer_1017

Does it work on the custom title area as well? I tried it, but no luck.

-Shayna

Anguz

Only where bbcode is parsed, like news, posts and signatures.
Cristián Lávaque http://cristianlavaque.com

stargazer_1017

Aww. . .okay, thanks Anguz :D I love this mod, BTW. Keep up the great work!

-Shayna

Advertisement: