Warning: The author of this contribution does not provide support for it anymore.

Count Down

Upgrade - Working with All Languages - Count Down

Upgrade - Working with All Languages

by Leinad4Mind » Wed Jul 27, 2011 12:15 am

How to put the MOD working with many Language Files? Just do this:

styles/THEME/template/count_down.html

FIND

Code: Select all

document.forms.count.count2.value="Countdown: Only "+dday+" days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+before+"."


REPLACE-WITH

Code: Select all

document.forms.count.count2.value="{L_ONLY_COUNT_DOWN}"+dday+"{L_DAYS_COUNT_DOWN}"+dhour+"{L_HOURS_COUNT_DOWN}"+dmin+"{L_MIN_COUNT_DOWN}"+dsec+"{L_SEC_COUNT_DOWN}"+before+"."



language/en/common.php

FIND

Code: Select all

?>


ADD BEFORE

Code: Select all

// Count Down MOD
$lang = array_merge($lang, array(
   'ONLY_COUNT_DOWN'            => 'Countdown: Only ',
   'DAYS_COUNT_DOWN'            => ' days, ',
   'HOURS_COUNT_DOWN'            => 'h ',
   'MIN_COUNT_DOWN'            => 'm and ',
   'SEC_COUNT_DOWN'            => 'sec. left until ',
));


But I don't know how to put the text itself in the two languages :oops:

Any help? I need 2 languages in maximum ^^
Last edited by Leinad4Mind on Wed Jul 27, 2011 1:30 pm
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Upgrade - Working with All Languages

by wang5555 » Wed Jul 27, 2011 8:08 am

I think that "language/en/common.php" already has some codes following.

Code: Select all

   'DAYS'               => 'Days',
   'HOURS'                     => 'Hours',
   'MINUTES'            => 'Minutes',
   'SECONDS'               => 'Seconds',

It is not need to add.

Another, if you use "{L_ONLY_COUNT_DOWN}", you must use too "'ONLY_COUNT_DOWN'", not "'COUNT_DOWN_ONLY'".
It is more blessed to give than to reveive, welcome to letter, thanks & good-bye!
Good luck ^_^
Welcome to my forum!!
http://wang5555.hopto.org/phpBB3/
p.s. Shut down computer before 11 clock night!!!
User avatar
wang5555
Translator
Posts: 602
Joined: Wed Oct 27, 2004 2:57 pm
Location: Taiwan

Re: Upgrade - Working with All Languages

by Leinad4Mind » Wed Jul 27, 2011 1:24 pm

Actually, after tested it I've change too: (because the text was too big and it doesn't appear all, it was cut.)

Code: Select all

// Count Down MOD
$lang = array_merge($lang, array(
   'ONLY_COUNT_DOWN'            => 'Countdown: Only ',
   'DAYS_COUNT_DOWN'            => ' days, ',
   'HOURS_COUNT_DOWN'            => 'h ',
   'MIN_COUNT_DOWN'            => 'm and ',
   'SEC_COUNT_DOWN'            => 'sec. left until ',
));


So I really need those extra lines. x'D. Principally for adapt to another languages.
I couldn't use the 'DAYS' 'cause "Days" it's not "days", the uppercase matters ^^.
If it doesn't maater I could use that, and put something like +dday+" "+"{L_DAYS}"+", " in count_down.html. But I prefer as I've done. ;)


OH! It's possible to you to create the effect marquee? (<marquee>TEXT</marquee> where the text moves right to left?

It would be awesome, if the text was bigger we could read it anyways. Think about it ;) It exist too javascript function. I just don't know how to implement x'D http://stackoverflow.com/questions/2467 ... user-input

One more thing, how can I've these:
before="{BEFORE_COUNT_DOWN}" for 2 languages?

In ACP I will needed one more var like "BEFORE2_COUNT_DOWN" to write in the other language. But I don't know how can I in count down see the language I've selected and select the "BEFORE_COUNT_DOWN" of the correct language ??

Cheers
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact: