EM change needed: lang_faq and lang_bbcode

Want to share what MODs you've gotten to work with EM? Happy about all the time your're saving? Want to say "thanks"? Here's the place.
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

EM change needed: lang_faq and lang_bbcode

Post by Nuttzy99 »

Since these files have no $lang keys, it is impossible to MOD them in anything other than English (or the primary language set). EM will have to recognize this and automatically perform any ADD commands just before the ?> in the file. Any REPLACE or IN-LINE commands will have to be ignored.

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site

AlleyKat
Registered User
Posts: 57
Joined: Thu Aug 28, 2003 2:43 am

Re: EM change needed: lang_faq and lang_bbcode

Post by AlleyKat »

Err sorry if I'm asking stupidly, but isn't this true for [edit: the lang files of ]every mod in existence anyway? Unless the mod comes with its own lang files (supplied in all languages), the lines added in English, t.ex. in lang_main.php, is the same line added in t.ex. German and Danish lang_main.php files. I see the problem, but really, that shouldn't bother you too much, some things simply can't be maintained fully through scripting.

8O But ofcourse you could implement Niels Christians 'translate'post'-MOD within EM and translate to/from all major languages on-the-fly through Babelfish, if you wanna blow peoples brains! :lol:

wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: EM change needed: lang_faq and lang_bbcode

Post by wGEric »

The FAQs language are put together like this:

Code: Select all

$faq[] = array("question", "answer");
$faq[] = array("--","Block heading goes here if wanted")
Top one is the question and answer. Bottom is the block headers.
Eric

Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: EM change needed: lang_faq and lang_bbcode

Post by Nuttzy99 »

lang_main and lang_admin have the $lang keys. Therefore instead of searching for $lang['Forum'] = 'Forum';, which will only work for English, I'm requiring that you search for $lang['Forum'] which absolutely only appears once in the file and also will allow you to work with ALL languages.

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site

AlleyKat
Registered User
Posts: 57
Joined: Thu Aug 28, 2003 2:43 am

Re: EM change needed: lang_faq and lang_bbcode

Post by AlleyKat »

I dig what you mean now. I was just thinking adding lines to the files, not changes in the middle of the file. I haven't come across a MOD yet (not even a bbcode one) not just adding to the end of those files. But I edited it by hand ofcourse; nice that future MODs CAN place them the right place on the page.

And ofcourse it will only work 'fully' for english anyway, as the lines themselves ofcourse will have to be edited by hand for all other languages.

Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: EM change needed: lang_faq and lang_bbcode

Post by Ptirhiik »

Haven't you got the same issue with the tpls settled in the localized email/ dir ?

Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: EM change needed: lang_faq and lang_bbcode

Post by Nuttzy99 »

Ptirhiik wrote:Haven't you got the same issue with the tpls settled in the localized email/ dir ?
In all honesty since this section of code is pretty much untouched by MODs I have never really explored the email templates.

-Nuttzy 8)

Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: EM change needed: lang_faq and lang_bbcode

Post by Nuttzy99 »

AlleyKat wrote:And ofcourse it will only work 'fully' for english anyway, as the lines themselves ofcourse will have to be edited by hand for all other languages.
If the author has translations then EM will eventually be able to handle them :wink:

-Nuttzy 8)

LLKwerv
Registered User
Posts: 81
Joined: Mon May 26, 2003 5:27 pm
Location: Wherever I am.
Contact:

Re: EM change needed: lang_faq and lang_bbcode

Post by LLKwerv »

thats cool! How?
hello

AlleyKat
Registered User
Posts: 57
Joined: Thu Aug 28, 2003 2:43 am

Re: EM change needed: lang_faq and lang_bbcode

Post by AlleyKat »

[quote="Nuttzy in FINDing your way..."]Dealing with Languages
When performing FINDs in lang_ files, keep in mind that ALL languages are going to be updated. Although values will change from language to language the variable names stay the same in ALL language packs. Therefore search only for the $lang array keys like "$lang['Forum']" and not "$lang['Forum'] = 'Forum';". It is very unwise to rely on comment (such as // That's all folks! ) in language files as often the comments are also translated into other languages.[/quote]

1 note on this. I still have to find a MOD (excepting a few of the BBCode ones) that doesn't search in this way. They simply ALL do to get to the end of those files, mainly ofcourse lang_main.php.

Couldn't you please consider a workaround for the

Code: Select all

//
// That's all, Folks!
// -------------------------------------------------
contra

Code: Select all

//
// That's all Folks!
// -------------------------------------------------
(the comma) issue? Thanks.

Locked