Re: multi-language templates
Friday, June 11, 2004, Thomas Fernandez wrote: U I do that using the mouse-wheel, so I have to do a mousy-click U first and then move my hand to the keyboard. So your %Cursor macro should still be above the %Quotes macro, or not? I prefer to have it under. Saves me a little bit of work when I do a short reply like this. -- Urban Bach was the most famous composer in the world and so was Handel. Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Urban, On Fri, 11 Jun 2004 03:09:53 +0200 GMT (11/06/2004, 08:09 +0700 GMT), Urban wrote: No, I'm not. But my cursor is indeed set before the quotes, and I delete or not and write my replies while I go along. U Didn't think of that. But I can see the sense in it. Just move down U using the arrow keys and start typing where-ever you are. Nice! More crtl-Y than arrow keys, in most cases. ;-) U I do that using the mouse-wheel, so I have to do a mousy-click U first and then move my hand to the keyboard. So your %Cursor macro should still be above the %Quotes macro, or not? -- Cheers, Thomas. Moderator der deutschen The Bat! Beginner Liste. Invent nonsense computer jargon in conversations, and see if people play along to avoid looking ignorant. Message reply created with The Bat! 2.11 under Chinese Windows 98 4.10 Build A using a Pentium P4 1.7 GHz, 256MB RAM Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Urban, On Wed, 9 Jun 2004 19:13:01 +0200 GMT (10/06/2004, 00:13 +0700 GMT), Urban wrote: %TO=[EMAIL PROTECTED] Hallo %TFName %Cursor %Quotes U Advocating top-posting now, are we? (tsk tsk) U SCNR No, I'm not. But my cursor is indeed set before the quotes, and I delete or not and write my replies while I go along. U snippeti-do-da :-Þ Help / Index / Macros / Full alphabetic list / Dash macro. No! It's gone! :-( U It's there, the first one, before ABnnnPPP. Ah - yes. I was just struck with blindness yesterday. Also, the Help window doesn't scroll with the scroll wheel. :-( U It does with my Microsoft thingie. Not with my Creative (== noname) thingy, which works with everything else. -- Cheers, Thomas. Moderator der deutschen The Bat! Beginner Liste. Was ist ein Optimist ? - Jemand der das eine Fernsehprogramm langweilig findet und auf das andere umschaltet! Message reply created with The Bat! 2.11 under Chinese Windows 98 4.10 Build A using a Pentium P4 1.7 GHz, 256MB RAM Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Tuesday, June 8, 2004, 11:52:31 PM, you wrote: There seems to be a conflict between different QT or a bug with the %LANGUAGE macro. I did not narrow down yet what might be the reason. I think I will start a new thread with this question. RA Good idea! RA When I am trying to debug QTs, I find it useful to put temporary RA statements in that print out in the message to allow me to follow what is RA happening. Another question about the SetLanguage QT: What exactly does the QT when I reply to a sender which is *not* in my AB? To put temporary statements does not work in this case, because TB crashes before any output is generated. -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Fri 11 June 2004, 7:46:27 +1000, Cyrille wrote: Another question about the SetLanguage QT: What exactly does the QT when I reply to a sender which is *not* in my AB? I looked back through this thread, and I think the answer is that it uses a default of setting the language to AM. You could confirm this by putting a statement Language=%_SetLang at some appropriate point in your QTs -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Thursday, June 10, 2004, Thomas Fernandez wrote: U Advocating top-posting now, are we? (tsk tsk) SCNR No, I'm not. But my cursor is indeed set before the quotes, and I delete or not and write my replies while I go along. Didn't think of that. But I can see the sense in it. Just move down using the arrow keys and start typing where-ever you are. Nice! I do that using the mouse-wheel, so I have to do a mousy-click first and then move my hand to the keyboard. -- Urban During the Renaissance America began. Christopher Columbus was a great navigator who discovered America while cursing about the Atlantic. His ships were called the Nina, the Pinta, and the Santa Fe. Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Cyrille, On Sun, 6 Jun 2004 23:49:43 +0200 GMT (07/06/2004, 04:49 +0700 GMT), Cyrille wrote: C What do you mean with manually? I use it in QT. C And I see it in many places at the end, and not at the beginning of a line. Let's say your QT looks like this: %TO=[EMAIL PROTECTED] Hallo %TFName %Cursor %Quotes Do you see how behind each line is a newline character? You have manually entered it. After the first line you definitely don't want a newline character, as there would be a blank line at the beginning of the mail. So you add %- at the end: %TO=[EMAIL PROTECTED]%- and the word Hallo is in the first line of the reply. C Where do I find more explanation about this particular expression in the help file? Help / Index / Macros / Full alphabetic list / Dash macro. No! It's gone! :-( Also, the Help window doesn't scroll with the scroll wheel. :-( -- Cheers, Thomas. Moderator der deutschen The Bat! Beginner Liste. Hypnotophobie: Angst vor dem Bettenmachen. Message reply created with The Bat! 2.11 under Chinese Windows 98 4.10 Build A using a Pentium P4 1.7 GHz, 256MB RAM Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Wednesday, June 9, 2004, Thomas Fernandez wrote: %TO=[EMAIL PROTECTED] Hallo %TFName %Cursor %Quotes Advocating top-posting now, are we? (tsk tsk) SCNR snippeti-do-da Help / Index / Macros / Full alphabetic list / Dash macro. No! It's gone! :-( It's there, the first one, before ABnnnPPP. Also, the Help window doesn't scroll with the scroll wheel. :-( It does with my Microsoft thingie. -- Urban No one's tall anymore. They're vertically enhanced. Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin and Roelof, The problem seems to be solved. Tuesday, June 8, 2004, 12:20:51 AM, you wrote: RA I agree with Roelof's suggestions: RA* put before the %- in each of the %If statements in the RA master_new_message QT This works the line which disappeard is back again now. RA* include %- at the end of the final %If statement in the RA master_new_message QT This part does not seem to have an influence on the output. RA And if you omit the %- after RA%If:%_SetLang=PL:%QInclude(new_PL): RA you will find you have one extra blank line in your Polish messages. With or without %- same result. The Polish messages behave like all the others... RA TB! will continue to look for what to do if the condition is false. I RA don't know enough about how the %If macro handles improperly constructed RA statements to work out how it interprets the set of statements you have, RA but I'm sure it causes problems! What does this mean for the SetLanguage QT? As far as I see there is also an empty action if false statement in the %If macros. Or is there something I misinterpret? After your (Robin's and Roelof's) debugging it looks like this now: - [ SetLANGUAGE QT ] - %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*([a-z]{2})$%RegExpMatch=%ABToMemo'%- %If:#%_SetLang###:##:#%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='fr':'%_SetLang=FR'%- %If:'%_SLDomain'='de':'%_SetLang=DE'%- %If:'%_SLDomain'='sk':'%_SetLang=SK'%- %If:'%_SLDomain'='cz':'%_SetLang=SK'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%- %If:'%_SLDomain'='pl':'%_SetLang=PL'#%- - [end of SetLANGUAGE QT ] - Where is the action if false statement? -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Tue 8 June 2004, 16:31:41 +1000, Cyrille wrote: The problem seems to be solved. Excellent RA* include %- at the end of the final %If statement in the RA master_new_message QT This part does not seem to have an influence on the output. RA And if you omit the %- after RA%If:%_SetLang=PL:%QInclude(new_PL): RA you will find you have one extra blank line in your Polish messages. With or without %- same result. The Polish messages behave like all the others... Even after adding the (action if false) at the end of the %If statements? I am a little surprised, but only a little. RA TB! will continue to look for what to do if the condition is false. I RA don't know enough about how the %If macro handles improperly constructed RA statements to work out how it interprets the set of statements you have, RA but I'm sure it causes problems! What does this mean for the SetLanguage QT? As far as I see there is also an empty action if false statement in the %If macros. Or is there something I misinterpret? After your (Robin's and Roelof's) debugging it looks like this now: - [ SetLANGUAGE QT ] - ...snip... %If:'%_SLDomain'='fr':'%_SetLang=FR'%- %If:'%_SLDomain'='de':'%_SetLang=DE'%- %If:'%_SLDomain'='sk':'%_SetLang=SK'%- %If:'%_SLDomain'='cz':'%_SetLang=SK'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%- %If:'%_SLDomain'='pl':'%_SetLang=PL'#%- - [end of SetLANGUAGE QT ] - Where is the action if false statement? Good question. You say it works at the moment, and that probably reflects the robustness of the macro's ability to parse the lines above. However it would be better to make them read %If:'%_SLDomain'='fr':'%_SetLang=FR':''%- %If:'%_SLDomain'='de':'%_SetLang=DE':''%- %If:'%_SLDomain'='sk':'%_SetLang=SK':''%- %If:'%_SLDomain'='cz':'%_SetLang=SK':''%- %If:'%_SLDomain'='ru':'%_SetLang=RU':''%- %If:'%_SLDomain'='hu':'%_SetLang=HU':''%- %If:'%_SLDomain'='pl':'%_SetLang=PL':''#%- -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Tuesday, June 8, 2004, 9:47:14 AM, you wrote: RA And if you omit the %- after RA%If:%_SetLang=PL:%QInclude(new_PL): RA you will find you have one extra blank line in your Polish messages. With or without %- same result. The Polish messages behave like all the others... RA Even after adding the (action if false) at the end of the %If RA statements? I am a little surprised, but only a little. I tried again: You are right. After adding the (action if false) also the %- at the end of the last if statement behaves differently from before. (Why?) Without the %- a blank line appears between the part of the sig coming from the language slave and the part of the sig coming from the master. But: This is the case not only for Polish but for all languages. (You know what I mean, don't you (-: ) But maybe there is nothing to worry about since it works now... What does this mean for the SetLanguage QT? As far as I see there is also an empty action if false statement in the %If macros. Where is the action if false statement? RA Good question. You say it works at the moment, and that probably reflects RA the robustness of the macro's ability to parse the lines above. However RA it would be better to make them read RA %If:'%_SLDomain'='fr':'%_SetLang=FR':''%- RA %If:'%_SLDomain'='de':'%_SetLang=DE':''%- RA %If:'%_SLDomain'='sk':'%_SetLang=SK':''%- RA %If:'%_SLDomain'='cz':'%_SetLang=SK':''%- RA %If:'%_SLDomain'='ru':'%_SetLang=RU':''%- RA %If:'%_SLDomain'='hu':'%_SetLang=HU':''%- RA %If:'%_SLDomain'='pl':'%_SetLang=PL':''#%- Done. Works fine. Aren't you proud of your student? He finds already the mistakes of his teacher... (-: Since the new message part of the solution works now, I will try to get it working for replies as well. The first tests do not look well. During the last two hours I crashed TB exactly nine times (got frozen and I had to kill it). There seems to be a conflict between different QT or a bug with the %LANGUAGE macro. I did not narrow down yet what might be the reason. I think I will start a new thread with this question. Thanx again. -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Tue 8 June 2004, 20:15:18 +1000, Cyrille wrote: The first tests do not look well. During the last two hours I crashed TB exactly nine times (got frozen and I had to kill it). There seems to be a conflict between different QT or a bug with the %LANGUAGE macro. I did not narrow down yet what might be the reason. I think I will start a new thread with this question. Good idea! When I am trying to debug QTs, I find it useful to put temporary statements in that print out in the message to allow me to follow what is happening. For example you might put in Language is %_SetLang or a statement at the start and end of each QT like New_EN QT starts New_En QT ends Then you will know where the process gets to before it hangs or gets in an infinite loop or something. -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Mon 7 June 2004, 15:15:24 +1000, Cyrille wrote: At the end of the QT I omitted also the # at the end of the last code line. Ah, yes I see now. I hadn't noticed that previously. What is this # good for? The %If macro works like this: %If:var1comparison operatorvar2:action if true:action if false which is equivalent to %If:var1comparison operatorvar2%- :action if true%- :action if false However, if you have nested %If macros, you need to adjust the delimiters (). So if you want to do another comparison operation if the first one is false, you might end up with: %If:var1comparison operatorvar2%- :if true 1%- :%If:'var1'comparison operator'var3':'if true 2':'if false 2' Note that I have used one delimiter (') for the inner %If macro, and a different one () for the outer. More complex macro combinations can have multiple levels of delimiters from nested %If, regex and other macros, requiring careful choice of delimiters. Common ones are ,',^,#,_,$ although almost any character can be used. Now in the QT we are referring to, there is a %if macro statement that starts %If:#%_SetLang###:##:#%- It is checking to see if %_SetLang is blank, using # as the delimiter (#%_SetLang###) If %_SetLang is blank, nothing happens because the action if true is blank (##) If %_SetLang is not blank then the rest of the QT should get executed (the end of the action if false is the last # of the QT, which you deleted). Since it was the last character in the QT, I don't think it will cause a problem, but it would be better to have it back in. However, it would be better to have the # before the %- to remove the blank line that will otherwise be there. The reason I used # as the delimiter is because within the action if false I had one regex and seven %If statements all separately using and ' as delimiters. == What *exactly* does %-? Put simply, it tells TB! to ignore a following new line (i.e. a blank line). It will also mark the end of a macro if there might be ambiguity about where the end is. For example, above I wrote %If:var1comparison operatorvar2%- :action if true%- :action if false as an alternative to having the %If statement on a single line. TB! sees it as a single line because of the %- at the end of each line. The reason I wrote it like that is because it is simpler to understand with the three parts to the %If statement on three separate lines. In addition, however, if I wanted to set the subject, from and to address in a QT, I could put %subject=something %from=me [EMAIL PROTECTED] %to=you [EMAIL PROTECTED] When TB! processed that, each line would affect the headers, BUT EACH LINE WOULD ALSO LEAVE A BLANK LINE IN THE BODY OF THE EMAIL. That is because TB! is very literal about the way it processes the content of QTs. If the QT contains plain text, it simply gets written to the place it is called from (the body of your message). If it contains a mixture of macros and plain text, the macros get executed, and the plain text gets copied to the body of your message. Now TB! sees all the new lines as plain text. They are not part of the macro, so they simply get written to the body of your message. If you don't want that, you must tell TB! to ignore the new line by putting %- immediately before it. So if you write %subject=something%- %from=me [EMAIL PROTECTED]%- %to=you [EMAIL PROTECTED]%- TB! ignores all those new lines and you don't get three blank lines in the body of your message. It's simple, but also confusing. I hope I have helped clear up some confusion! ;-) -- No smiley icon there as far as I am concerned!! -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hallo Cyrille, On Mon, 7 Jun 2004 07:15:24 +0200GMT (7-6-04, 7:15 +0200, where I live), you wrote: C At the end of the QT I omitted also the # at the end of the last code C line. That's isn't a very good idea. You'd better put it back. C What is this # good for? It's a delimiter, just like you can use or '' to separate sections, you can also use ##, _ _ or . In this case your first %if statement uses #, so it read %if:#condition#:#then#:#else# The else part was a whole lot of %if's and by omitting the last # you confuse TB where to stop with your %if. It might go alright because there's nothing relevant until the end of the QT, but as a matter of principle you should always try to use a correct syntax. C What *exactly* does %-? It tells the editor to ignore the newline character immidiately behind it. So the editor translates this: I'm typing a $- silly text. to I'm typing a silly text In this example the %- macro has no real use, but in complex macros or QT's it can enhance the readability by placing separate constructs on a single line in stead of having everything on one single line. C Where in the help file or where on the net can I read more about # and C %- ? The # part is explained in the 'main macros page' in the help. -- Groetjes, Roelof Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies or rabbits. Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Monday, June 7, 2004, 9:41:40 AM, you wrote: What *exactly* does %-? RA It tells TB! to ignore a following new line (i.e. a blank line). RA It will also mark the end of a macro if there might be ambiguity about RA where the end is. (...) RA When TB! processed that, each line would affect the headers, BUT EACH RA LINE WOULD ALSO LEAVE A BLANK LINE IN THE BODY OF THE EMAIL. RA So if you write RA%subject=something%- RA%from=me [EMAIL PROTECTED]%- RA%to=you [EMAIL PROTECTED]%- RA TB! ignores all those new lines and you don't get three blank lines in RA the body of your message. Thank you for taking the time to give such a detailed answer. I found your explanations extremely clear and very helpful. But now I happen to have the problem the other way around!!! Lines disappear which should be there. With my several levels of nested QT it seems that one of the QT swallows lines of the others. But I could not determine where it comes from: What I do is still based on what you proposed in mid:[EMAIL PROTECTED] : RA This would allow you to have: RA* one SetLanguage QT, RA* one master template for new messages RA* one master template for replies RA* one master template for forwarding RA Then each language that you want to support would have a 3 'slave' RA templates, one for new messages, one for replies and one for forwarding. For the moment I have it working only for new messages. In addition to your proposition I have a lang_parameters_XX QT in each language where I set %Charset and %Language. I include these QTs in the three 'slave' templates instead of defining three times the same parameters. Now comes the complicated part: My signature is split into two of the above mentioned templates. The cut mark and a 'Many greetings' line are in the language 'slaves' (since this is language dependent). But my e-mail, URL, phone, etc. is in the master template (because it is the same in all languages). These two elements should be simply one beneath the other. What happens is that the cut mark and the 'Many greetings' line are OK, but below, the part coming from the master, misses its first row and starts only with the 2nd row. Here comes the code of the master template: [ master_new_message ] %QInclude(SetLanguage)%- %If:%_SetLang=AM:%QInclude(new_EN):%- %If:%_SetLang=FR:%QInclude(new_FR):%- %If:%_SetLang=DE:%QInclude(new_DE):%- %If:%_SetLang=SK:%QInclude(new_SK):%- %If:%_SetLang=CZ:%QInclude(new_SK):%- %If:%_SetLang=RU:%QInclude(new_RU):%- %If:%_SetLang=HU:%QInclude(new_HU):%- %If:%_SetLang=PL:%QInclude(new_PL): mailto:%FROMADDR http://www.mydomain.net My address and my phone [ end of master_new_message ] And this is the code of the language slaves: [ new_FR ] Bonjour %CAPITALFIRST=%TOFName, %QInclude(lang_parameters_FR)%- Texte en français %CURSOR -- A bientôt, [ end of new_FR ] The output of this looks like this - [ generated message ] Bonjour Cyrille, Texte en français [cursor] -- A bientôt, http://www.mydomain.net My address and my phone - [ end of generated message ] This means that the mailto:%FROMADDR line was dropped. Why? -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hallo Cyrille, On Mon, 7 Jun 2004 15:18:42 +0200GMT (7-6-04, 15:18 +0200, where I live), you wrote: C %If:%_SetLang=AM:%QInclude(new_EN):%- Try to insert behind every last colon or omit every trailing colon. It looks like the %if statement are grabbing some extra text, since the editor thinks he still has to process something. Maybe a %- behind the last %if statement might work too. -- Groetjes, Roelof Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies or rabbits. Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Mon 7 June 2004, 23:18:42 +1000, Cyrille wrote: But now I happen to have the problem the other way around!!! Lines disappear which should be there. With my several levels of nested QT it seems that one of the QT swallows lines of the others. But I could not determine where it comes from: ...snip... I agree with Roelof's suggestions: * put before the %- in each of the %If statements in the master_new_message QT * include %- at the end of the final %If statement in the master_new_message QT I should have paid more attention to details and included an empty action if false statement in the %If macros in the new message template in mid:[EMAIL PROTECTED] Otherwise as Roelof noted TB! will continue to look for what to do if the condition is false. I don't know enough about how the %If macro handles improperly constructed statements to work out how it interprets the set of statements you have, but I'm sure it causes problems! And if you omit the %- after %If:%_SetLang=PL:%QInclude(new_PL): you will find you have one extra blank line in your Polish messages. I would expect that to fix the problem. If not, provide the content for lang_parameters_FR, and I will set it up on my system and try to debug it. -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Saturday, June 5, 2004, 3:25:40 AM, you wrote: RA I'm sure it will be lines in a QT that don't have the %- at the end. What exactly does *- do ? [20 min browsing through the help file did not give any answer.] -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Cyrille, On Sun, 6 Jun 2004 19:31:44 +0200 GMT (07/06/2004, 00:31 +0700 GMT), Cyrille wrote: RA I'm sure it will be lines in a QT that don't have the %- at the end. C What exactly does *- do ? *- does nothing. %- suppresses the new line that you manually enter after it. -- Cheers, Thomas. Moderator der deutschen The Bat! Beginner Liste. My wife and I were happy for twenty years then we met. Message reply created with The Bat! 2.11 under Chinese Windows 98 4.10 Build A using a Pentium P4 1.7 GHz, 256MB RAM Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Thomas, Sunday, June 6, 2004, 7:44:19 PM, you wrote: TF *- does nothing. %- suppresses the new line that you manually TF enter after it. Sorry for my mistyping. But still did not get the point. What do you mean with manually? I use it in QT. And I see it in many places at the end, and not at the beginning of a line. Where do I find more explanation about this particular expression in the help file? -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Saturday, June 5, 2004, 3:25:40 AM, you wrote: RA Hmm, I'm sure it will be lines in a QT that don't have the %- at the end. RA Perhaps there are some blank lines that should have a %-. Check that RA there are no blank lines at the end of a QT. These may not be obvious RA until you investigate closely. Now I managed to get rid of these empty lines by changing something in the QT you proposed at at mid:[EMAIL PROTECTED] and mid:[EMAIL PROTECTED] Since I do not feel very sure about changing the code I send you a copy of what I did. The new version works for the empty lines. But I wonder whether my intervention might not affect something else... Below follows first the old version (1) which provoked these empty lines, and then the new version (2) with my changes. (1) [ SetLanguage QT ] %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*([a-z]{2})$%RegExpMatch=%ABToMemo' %If:#%_SetLang###:##:#%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='fr':'%_SetLang=FR'%- %If:'%_SLDomain'='de':'%_SetLang=DE'%- %If:'%_SLDomain'='sk':'%_SetLang=SK'%- %If:'%_SLDomain'='cz':'%_SetLang=SK'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%- %If:'%_SLDomain'='pl':'%_SetLang=PL'%-# %- [ End SetLanguage QT ] (2) [ SetLanguage QT ] %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*([a-z]{2})$%RegExpMatch=%ABToMemo'%- %If:#%_SetLang###:##:#%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='fr':'%_SetLang=FR'%- %If:'%_SLDomain'='de':'%_SetLang=DE'%- %If:'%_SLDomain'='sk':'%_SetLang=SK'%- %If:'%_SLDomain'='cz':'%_SetLang=SK'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%- %If:'%_SLDomain'='pl':'%_SetLang=PL'%- [ End SetLanguage QT ] My changes are at the end of line 10 and at the very end of the QT. -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Mon 7 June 2004, 8:05:59 +1000, Cyrille wrote: (2) [ SetLanguage QT ] %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*([a-z]{2})$%RegExpMatch=%ABToMemo'%- %If:#%_SetLang###:##:#%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='fr':'%_SetLang=FR'%- %If:'%_SLDomain'='de':'%_SetLang=DE'%- %If:'%_SLDomain'='sk':'%_SetLang=SK'%- %If:'%_SLDomain'='cz':'%_SetLang=SK'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%- %If:'%_SLDomain'='pl':'%_SetLang=PL'%- [ End SetLanguage QT ] My changes are at the end of line 10 and at the very end of the QT. What you have done at the end of line 10 is correct. It actually appears to be line 11 if you count the blank line at the beginning. If the first line is in you QT (the one _before_ %REM=^%-) this should also have %-. If the last two blank lines are in your QT, they should also have %-. However all three of those blank lines could safely be omitted since they do nothing. -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Monday, June 7, 2004, 2:37:25 AM, you wrote: RA What you have done at the end of line 10 is correct. It actually appears RA to be line 11 if you count the blank line at the beginning. At the end of the QT I omitted also the # at the end of the last code line. What is this # good for? What *exactly* does %-? Where in the help file or where on the net can I read more about # and %- ? RA However all three of those blank lines could safely be omitted since they RA do nothing. Done. -- Thank you, Robin, for your repeated help! Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Cyrille, Do you have another idea what could be the reason? I fully concur with what Robin Anson tells you in his reply. -- Best regards, Miguel A. Urech (El Escorial - Spain) Using The Bat! v2.10.03 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello MAU, Wednesday, June 2, 2004, 1:54:06 AM, you wrote: M Include %- without the quote marks at the end of each QINCLUDE line. I went through all my QT. The %- are all there. But I still have my empty lines before the greeting in all my generated messages. Do you have another idea what could be the reason? -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Sat 5 June 2004, 8:38:14 +1000, Cyrille wrote: I went through all my QT. The %- are all there. But I still have my empty lines before the greeting in all my generated messages. Hmm, I'm sure it will be lines in a QT that don't have the %- at the end. Perhaps there are some blank lines that should have a %-. Check that there are no blank lines at the end of a QT. These may not be obvious until you investigate closely. It's hard to tell without actually seeing the QTs as they are written, including all the blank lines at the end. If you can't solve the problem, provide a copy of the QTs in a message to the list, and we can help. -- Robin Anson Using The Bat! v2.11.02 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.11.02 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Tue 1 June 2004, 7:24:05 +1000, Cyrille wrote: I am wondering what is the best way to use it also for Reply and Forward templates? Of course, it would be possible create three QT SetLanguage like the one you described: %SetLanguage1 calls the templates for New Messages. %SetLanguage2 calls the templates for Replies. %SetLanguage3 calls the templates for forwarding messages. And in the Account or Folder templates I could include %SetLanguage1 in the New Message template, %SetLanguage2 in the Reply template, etc... I didn't try it yet. But this should not be a problem. But I wonder whether there is no other solution? Something more elegant? Having one single chain of templates instead of three Does anybody have some ideas? You are right, there is a better way than creating multiple SetLanguage QTs. Here is one approach (based upon my messages at mid:[EMAIL PROTECTED] and the update at mid:[EMAIL PROTECTED]): 1. Edit the existing SetLanguage QT to take out the last 4 lines that actually select the templates EN_template, HU_template, etc. 2. Put these 4 lines in the master new message template so that this template now reads: [ New Message Template ] %QInclude(SetLanguage)%- %If:%_SetLang=AM:%QInclude(EN_Template):%- %If:%_SetLang=CZ:%QInclude(CZ_Template):%- %If:%_SetLang=RU:%QInclude(RU_Template):%- %If:%_SetLang=HU:%QInclude(HU_Template):%- Cyrille mailto:[EMAIL PROTECTED] [ End New Message Template ] The value of %_SetLang is carried out of the SetLanguage QT into the new message template and allows you to make the selection of an appropriate language template in the new message template itself. 3. For replies, create a master reply template that uses the same SetLanguage QT to select the language, then calls an appropriate language specific reply template. These might be called EN_Reply, CZ_Reply, RU_Reply, HU_Reply. 4. In a similar way create a master forwarding template This would allow you to have: * one SetLanguage QT, * one master template for new messages * one master template for replies * one master template for forwarding Then each language that you want to support would have a 3 'slave' templates, one for new messages, one for replies and one for forwarding. You might also find that the first part of the reply and forwarding templates for each language is simply the new message template for that language. -- Robin Anson Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Robin, Tuesday, June 1, 2004, 1:47:13 PM, you wrote: RA ... RA This would allow you to have: RA* one SetLanguage QT, RA* one master template for new messages RA* one master template for replies RA* one master template for forwarding RA Then each language that you want to support would have a 3 'slave' RA templates, one for new messages, one for replies and one for forwarding. This works fine. Thank you!! I'am still working on fine tuning the templates. But I have a problem with many *empty* lines which show up in my generated messages. My impression is that each %QINCLUDE(xxx) line in the templates provokes a line feed in the final output. How can I avoid this? RA You might also find that the first part of the reply and forwarding templates RA for each language is simply the new message template for that language. I am not sure whether I understand how you mean this. -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ the sig delimiter left TB correctly formatted! ] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Cyrille, My impression is that each %QINCLUDE(xxx) line in the templates provokes a line feed in the final output. How can I avoid this? Include %- without the quote marks at the end of each QINCLUDE line. -- Best regards, Miguel A. Urech (El Escorial - Spain) Using The Bat! v2.10.03 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Wed 2 June 2004, 8:36:51 +1000, Cyrille wrote: RA You might also find that the first part of the reply and forwarding templates RA for each language is simply the new message template for that language. I am not sure whether I understand how you mean this. Let me show by an example. For one of my accounts, my new message template looks like: ,- [ New message ] | %Qinclude(Greet_All_Recipients)%- | %Cursor | | Robin | | -- | %Qinclude(DefaultSig) | `- For that same account my forward message template looks like: ,- [ forward message ] | %Qinclude(Greet_All_Recipients)%- | %Cursor | | Robin | | -- | %Qinclude(DefaultSig) | | ===8===Original message | This is a forwarded message | From: %OFromName %OFromAddr | To: %OToList | Date: %ODateEn, %OTimeLong | Subject: %OFullSubj | | %Text | ===8=End original message== | %Subject=Fwd: %OFullSubj%- `- If I had created a QT called EN_New (as you might need to do) like this: ,- [ EN_New ] | %Qinclude(Greet_All_Recipients)%- | %Cursor | | Robin | | -- | %Qinclude(DefaultSig) | `- Then I could also have a QT called EN_Forward like this: ,- [ EN_Forward ] | %Qinclude(EN_New)%- | | ===8===Original message | This is a forwarded message | From: %OFromName %OFromAddr | To: %OToList | Date: %ODateEn, %OTimeLong | Subject: %OFullSubj | | %Text | ===8=End original message== | %Subject=Fwd: %OFullSubj%- `- I might also have a QT called EN_Reply like this: ,- [ EN_Reply ] | %Qinclude(EN_New)%- | | | ===8===Original message | From: %OFromName %OFromAddr | To: %OToList | Date: %ODateEn, %OTimeLong | Subject: %OFullSubj | | %Text | ===8=End original message== | %Subject=Re: %OFullSubj%- `- Then if I make a change in my EN_New QT, it is reflected in the new message template, the reply template and the forward message template. -- Robin Anson Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: multi-language templates
Hello Robin, Wednesday, May 26, 2004, 2:19:12 AM, you wrote: RA You would need to create Reply and Forward RA message templates in a similar way. However, it shouldn't be too RA difficult to do. Your proposition (mid:[EMAIL PROTECTED]) works very well. But for the moment I have it working only for New Messages. I am wondering what is the best way to use it also for Reply and Forward templates? Of course, it would be possible create three QT SetLanguage like the one you described: %SetLanguage1 calls the templates for New Messages. %SetLanguage2 calls the templates for Replies. %SetLanguage3 calls the templates for forwarding messages. And in the Account or Folder templates I could include %SetLanguage1 in the New Message template, %SetLanguage2 in the Reply template, etc... I didn't try it yet. But this should not be a problem. But I wonder whether there is no other solution? Something more elegant? Having one single chain of templates instead of three Does anybody have some ideas? -- Greetings from old Europe to Robin in Australia, Cyrille mailto:[EMAIL PROTECTED] [ the sig delimiter left TB correctly formatted! ] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Wed 26 May 2004, 10:19:12 +1000, I wrote: 2. Create SetLanguage QT to select an appropriate language like this [ SetLanguage QT ] %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*[a-z]{2}$%RegExpMatch=%ABToMemo' %If:^%_SetLang^^^:^%Language=%_SetLang^:^%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='cz':'%_SetLang=CZ'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%-^ %- %If:%_SetLang=AM:%QInclude(EN_Template):%- %If:%_SetLang=CZ:%QInclude(CZ_Template):%- %If:%_SetLang=RU:%QInclude(RU_Template):%- %If:%_SetLang=HU:%QInclude(HU_Template):%- [ End SetLanguage QT ] Okay, so now I have actually tried to run it, and found a couple of bugs and one redundant statement. To run properly it should read: [ SetLanguage QT ] %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*([a-z]{2})$%RegExpMatch=%ABToMemo' %If:#%_SetLang###:##:#%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='cz':'%_SetLang=CZ'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%-# %- %If:%_SetLang=AM:%QInclude(EN_Template):%- %If:%_SetLang=CZ:%QInclude(CZ_Template):%- %If:%_SetLang=RU:%QInclude(RU_Template):%- %If:%_SetLang=HU:%QInclude(HU_Template):%- [ End SetLanguage QT ] -- Robin Anson Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: multi-language templates
Hello Robin, Monday, May 24, 2004, 5:00:53 AM, you wrote: raoca If you want to set a language for existing addressbook entries (as raoca opposed to being able to set a language in a reply to a previously raoca unknown sender), one approach would be to use the addressbook memo field Is there a (semi-)automated way to insert such a line in hundreds of AB entries? raoca For recipients that don't use your standard language, Unfortunately I do not have any standard language. raoca you could include a raoca line in the memo field that looks like language: FR and include in your raoca message template a macro that searches for such an entry in this field. I raoca currently do this for setting read and delivery receipt requests, and for raoca selecting which signatures to use for particular recipients. raoca If you create the following QT, it will look for language: XX on a line raoca by itself in the memo field of the first recipient of the message, and raoca set the language of the message accordingly. Other information in the raoca memo field (on other lines) will not affect the language setting. I find your proposition very helpful, and I would like to use it. But I am afraid of manually adding a line to all my AB entries. And since reality is more complicated than any theory I guess that I will forget sometimes to add this line to each new contact. That is why I dream about the following solution: When composing a message (new or reply), 1) your QT could get the language information from the AB memo field, 2) if there is no such info, the recipient's address domain extension is used to determine the language, 3) if this is not possible (.com or Slovak using a Czech domain, etc.), in this case there should be a possibility to call manually a QT (as Miguel Urech described on Saturday in mid:[EMAIL PROTECTED]) And depending on this language information 1) %CharSet is defined, 2) %Language is defined and 3) different text templates are used Sounds good, doesn't it? - Who writes the code? (-: If I get this working I will uninstall MS Outlook from my machine. (-: -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Wed 26 May 2004, 4:31:03 +1000, Cyrille wrote: Is there a (semi-)automated way to insert such a line in hundreds of AB entries? If the addressbook entries do not already have information in the memo field, you can select multiple entries, and then Edit-Properties and select the memo tab to enter the same information in all of them at once. This will overwrite any existing information in that field though. And since reality is more complicated than any theory I guess that I will forget sometimes to add this line to each new contact. That is why I dream about the following solution: When composing a message (new or reply), 1) your QT could get the language information from the AB memo field, 2) if there is no such info, the recipient's address domain extension is used to determine the language, 3) if this is not possible (.com or Slovak using a Czech domain, etc.), in this case there should be a possibility to call manually a QT (as Miguel Urech described on Saturday in mid:[EMAIL PROTECTED]) And depending on this language information 1) %CharSet is defined, 2) %Language is defined and 3) different text templates are used I would suggest something based on the following. Assume for you want to have specific Hungarian, Russian and Czech language options, and will use English if none of the above apply. 1. Set up a new message template like this: [ New Message Template ] %QInclude(SetLanguage) Cyrille mailto:[EMAIL PROTECTED] [ End New Message Template ] 2. Create SetLanguage QT to select an appropriate language like this [ SetLanguage QT ] %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code If this doesn't exist, use the TLD in the recipient's address ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*[a-z]{2}$%RegExpMatch=%ABToMemo' %If:^%_SetLang^^^:^%Language=%_SetLang^:^%- %- %Rem=No language entry in the addressbook%- %- %_SLDomain='%SetPattRegExp=\.([^\.]*?)$%RegExpMatch(%ToAddr)%-' %_SetLang=AM%- %- %If:'%_SLDomain'='cz':'%_SetLang=CZ'%- %If:'%_SLDomain'='ru':'%_SetLang=RU'%- %If:'%_SLDomain'='hu':'%_SetLang=HU'%-^ %- %If:%_SetLang=AM:%QInclude(EN_Template):%- %If:%_SetLang=CZ:%QInclude(CZ_Template):%- %If:%_SetLang=RU:%QInclude(RU_Template):%- %If:%_SetLang=HU:%QInclude(HU_Template):%- [ End SetLanguage QT ] 3. Set up language templates called EN_Template, HU_Template, RU_Template and CZ_Template that set up the appropriate attributes. I don't speak Hungarian, Russian or Czech, so I don't know what greetings or other text you might want in it, but the English one might simply look like this - [ EN_Template QT ] %Language=AM%- %CharSet=ISO-8859-1 %Qinclude(Greet_All_Recipients) %Cursor -- Best regards, - [ End EN_Template QT ] Where Greet_All_Recipients is a QT in the library at http://www.silverstones.com/thebat/Library.html that puts in the first name of all recipients on the TO list. So the new message template puts in your name and email address at the end, and calls the SetLanguage QT to get the right language template. Then the language template sets the language and charset and language specific parts of the message. Now, I haven't checked that it all works precisely as I have set out. I haven't debugged it, and you would need to create Reply and Forward message templates in a similar way. However, it shouldn't be too difficult to do. Note also that I don't use the %CharSet macro, so I have only guessed at how it is set. -- Robin Anson Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Roelof, On Sat, 22 May 2004 20:13:30 +0200 GMT (23/05/2004, 01:13 +0700 GMT), Roelof Otten wrote: RO I'll readily admit that there probably is some language recognizing RO software, but that would a bit of specialized stuff. Word on XP Pro kept switchign from EN to DE when I wrote a letter in German recently. This was especially unneverving since it swiotched the keyboard layout, so I got a y whenever I typed a z. :-( -- Cheers, Thomas. Moderator der deutschen The Bat! Beginner Liste. If someone with multiple personalities threatens to kill himself, is it considered a hostage situation? Message reply created with The Bat! 2.11 Beta/6 under Chinese Windows 98 4.10 Build A using a Pentium P4 1.7 GHz, 256MB RAM Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: multi-language templates
Hello Roelof, Saturday, May 22, 2004, 8:13:30 PM, you wrote: C My question: I would like TB to choose automatically C * the right language template, according to the domain extension C of the recipients address. (But what should happen in case of .com C or .net domains?) RO Can be done with a series of nested if macros. But what would you do RO with an Hungarian with an address at gmx.de I agree that this is not a perfect criteria, but what you propose below is not much better... RO Better would be to do something with your address book (AB). You could RO either use AB templates (templates associated group contacts in your RO AB or associated with AB groups) or consequently insert the Country RO field in the AB for every contact. RO This will help you pick the language automatically for everybody in RO your AB. I am not very keen on manually inserting the country field in the AB for my 800 contacts. Because this solution is not much better than analyzing the email address. It is true that in many cases it is possible to say country = language , but Central Europe is not the Netherlands. In most of the countries there are several official languages (Hungarians in Slovakia, Germans in Romania, etc.). As far as I know, language information does not belong to the Internet standard of vCards which TB uses for his address book. If there would be something like that, this would be of course the cleanest solution. C (Or does anybody have a better idea what could be the criteria for C the choice?) RO The easiest way to achieve this, is via AB group templates. Create AB RO groups, call them Russian, Hungarian, Dutch, English, Swahili (oops, RO that's not European), whatever. RO Add your contacts to the right language group. RO Associate the language templates with the groups and you're done. RO You pick an address and TB will pick the language. Inconvenience: AB groups need continuos manual maintenance. Each old and new contact needs to be sorted in the language groups. I still did not give up the idea that it is possible to write some template code which determines the right language in most of the cases. And in the cases in which this does not work (what is unavoidable with either of the proposed solutions) the only thing to do is to call the template manually. -- Groetjes, Cyrillemailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
On Mon 24 May 2004, 4:20:23 +1000, Cyrille wrote: I am not very keen on manually inserting the country field in the AB for my 800 contacts. Because this solution is not much better than analyzing the email address. It is true that in many cases it is possible to say country = language , but Central Europe is not the Netherlands. In most of the countries there are several official languages (Hungarians in Slovakia, Germans in Romania, etc.). As far as I know, language information does not belong to the Internet standard of vCards which TB uses for his address book. If there would be something like that, this would be of course the cleanest solution. If you want to set a language for existing addressbook entries (as opposed to being able to set a language in a reply to a previously unknown sender), one approach would be to use the addressbook memo field For recipients that don't use your standard language, you could include a line in the memo field that looks like language: FR and include in your message template a macro that searches for such an entry in this field. I currently do this for setting read and delivery receipt requests, and for selecting which signatures to use for particular recipients. If you create the following QT, it will look for language: XX on a line by itself in the memo field of the first recipient of the message, and set the language of the message accordingly. Other information in the memo field (on other lines) will not affect the language setting. Then include %Qinclude(SetLang) in your message templates. -- [SetLang QT] -- %REM=^%- Set language based on recipient's addressbook memo entry containing a line starting Language: followed by the language code ^%- %- %_SetLang='%SetPattRegExp=(?im)^Language:\s*([a-z]{2})\s*$%RegExpMatch=%ABToMemo'%- %If:%_SetLang:%Language=%_SetLang:%- [End SetLang QT] -- Robin Anson Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
multi-language templates
Hello , I am thinking about making TB my default mail client. But I am not yet convinced. My decision depends on whether I find a solution for the following problem: My situation: I have to handle mail in 6 European languages and (at least) 3 different charsets. My question: I would like TB to choose automatically * the right language template, * the right charset and * the right spell checker according to the following criteria: - New mail templates: according to the domain extension of the recipients address. (But what should happen in case of .com or .net domains?) - Reply / Forward templates: according to the language used in the original message. (In this case there is no problem with the choice of the charsets, because TB can keep the charset of the original message.) (Or does anybody have a better idea what could be the criteria for the choice?) Is this possible? If yes, how? Important: I don't want different folders for different languages. My folders are organized by topic. Does somebody out there has some other hints what could be helpful in dealing with mail in multiple languages? -- Best regards, Cyrille mailto:[EMAIL PROTECTED] [ TB! 2.10.01, Windows ME 4.90 Build 3000, Pentium 233Mhz with 95MB ] Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Cyrille, Is this possible? If yes, how? Important: I don't want different folders for different languages. My folders are organized by topic. Does somebody out there has some other hints what could be helpful in dealing with mail in multiple languages? It is possible to a certain extent. Although I basically just deal with two languages, English and Spanish, I'll give some ideas of things I've done in the past or do now. To start with, I would suggest that you create a QT (Quick Template) for each language and name them accordingly: ENG, ESP, GER, etc., in which you define the language, character set, perhaps signature and even account or from address if you wanted to use different accounts or from addresses for different languages. These QTs can then be used manually or 'automatically' from other QTs or templates. Let's talk first about NEW messages. Whether you use AB, folder or account templates, when you start a new message you can then type (anywhere in the body) the name of the adequate QT and hit Ctrl+Space to 'execute' it. After that, the proper language, etc. will be set. In order to not forget to use the appropriate QT you can include a list of the language QTs in your New message template like if they were a menu to choose from, something like this: ENG ESP GER This way, all you have to do is place the cursor at the end of the name of one of them and hit Ctrl+Space If you know that you always write in the same language to the same people, you can automate this even more if you use AB (Address Book) or Group templates by doing a %QUINCLUDE=LAN, where LAN is the name of the appropriate QT. If you can write to some people in more than one language (i.e. because you CC someone else), what you can include is a 'menu' of language QTs and you can decide manually each time you write to that person. What about replies and forwards? Obviously enough you have the same options as described above. But I will point you to another one a bit more automatic that I use to reply in the same language of the message I am replying to. The question is how can TB know what language is the original message in. I my case I get help from POPFile. Instead of configuring POPFile to just classify spam and no-spam I have trained it to recognise different languages and so, the messages are classified either as SPAM, or ENG or ESP. I have POPFile configured to include an X-Text-Classification: XXX, where, in my case, it can be either SPAM, ENG or ESP. Then, in my reply templates I include this line: %Cursor%QINCLUDE=SLANG%- Obviously enough, SLANG is the name of the QT where I detect the language of the message I am replying to and set my reply accordingly. This is my: ,- [ SLANG Quick Template ] | %IF:%SETPATTREGEXP='(?im-s)^(X-Text-Classification)\:\s*(.*)$'%- | %REGEXPBLINDMATCH='%HEADERS'%- | %SUBPATT='2'=eng:%LANGUAGE='CSAPI BR':%LANGUAGE='CSAPI SP' `- In my case I am just choosing between two languages. So, if original message is not in English, it must be in Spanish. In your case you would have your SLANG QT a bit more complex. I hope I have been of some help and given you some ideas. -- Best regards, Miguel A. Urech (El Escorial - Spain) Using The Bat! v2.10.03 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Cyrille, I forgot to say a couple of things in my previous message. Talking about using AB or Groups templates, you can create in you AB a groups for each language and then, when you include someone new in your AB assign him/her to the appropriate group. The main reason I use the help of POPFile is because I get many queries from unknown people and have to reply to them, but I do not want to include them in my AB. -- Best regards, Miguel A. Urech (El Escorial - Spain) Using The Bat! v2.10.03 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hallo Cyrille, On Sat, 22 May 2004 18:08:26 +0200GMT (22-5-04, 18:08 +0200, where I live), you wrote: C I am thinking about making TB my default mail client. Good choice. C My situation: I have to handle mail in 6 European languages and (at C least) 3 different charsets. That should offer no diffuculties. C My question: I would like TB to choose automatically C* the right language template, You should create those yourself. Considering the rest of your wishes, you'd best create those templates as Quick Templates (QT) and pick them via your account templates and some criteria. C* the right charset and Can be done with the %CharSet= macro (see the help-file). You can place that macro in your language template. C* the right spell checker Can be done with the %Language= macro (see the help file). Since your language template is language specific, that's the most logical place to insert this macro. C according to the following criteria: C - New mail templates: according to the domain extension of the recipients C address. (But what should happen in case of .com or .net domains?) Can be done with a series of nested if macros. But what would you do with an Hungarian with an address at gmx.de Better would be to do something with your address book (AB). You could either use AB templates (templates associated group contacts in your AB or associated with AB groups) or consequently insert the Country field in the AB for every contact. This will help you pick the language automatically for everybody in your AB. For new contacts you'd either have to create a template that uses the aforementioned series of nested templates (with all possible options for mistakes) or create a general template that'll make do for anything (you can always manually pick your correct language QT) or insert the recipient in your AB with the correct language setting. C - Reply / Forward templates: according to the language used in the C original message. Forget about that. That's impossible. Without too much trouble I can device a message (that won't make any sense, but that isn't the point) that includes twenty words that can be found in three or four languages and then you expect TB to tell you what language that is? I'll readily admit that there probably is some language recognizing software, but that would a bit of specialized stuff. You'd better use the same criteria as for your new mail templates, I suppose that would make things easier for you to fix any bugs you encounter in your language picking system. C (In this case there is no problem with the choice of the C charsets, because TB can keep the charset of the original message.) I can think of several instances where you'd like to override the charset chosen by your contact (I'm doing that every now and then), so it what be best IMO to pick it with your language template. C (Or does anybody have a better idea what could be the criteria for C the choice?) The easiest way to achieve this, is via AB group templates. Create AB groups, call them Russian, Hungarian, Dutch, English, Swahili (oops, that's not European), whatever. Add your contacts to the right language group. Associate the language templates with the groups and you're done. You pick an address and TB will pick the language. To do your maintenance for these language templates, it's best to create them as QT's and insert them into your AB group templates with the %QInclude= macro (see the help file) This will make it possible for you to easily pick a language for somebody not in your AB or when you want to address a Russian in Hungarian. C Is this possible? If yes, how? I suppose it's possible and I've addressed the how. ;-) Note that whatever system you use, as soon as you pick your first addressee you're stuck with the language. So when you send one mail to somebody Irish, somebody Russian and somebody German, you've got to use the same template (and language) to all three of them. C Important: I don't want different folders for different languages. My C folders are organized by topic. I couldn't care less. C Does somebody out there has some other hints what could be helpful in C dealing with mail in multiple languages? Probably. You're not the only one mailing in different languages. -- Groetjes, Roelof Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies or rabbits. Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hello Roelof, C - Reply / Forward templates: according to the language used in the C original message. Forget about that. That's impossible. Without too much trouble I can device a message (that won't make any sense, but that isn't the point) that includes twenty words that can be found in three or four languages and then you expect TB to tell you what language that is? I'll readily admit that there probably is some language recognizing software, but that would a bit of specialized stuff. POPFile works a treat if you train it :) -- Best regards, Miguel A. Urech (El Escorial - Spain) Using The Bat! v2.10.03 Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: multi-language templates
Hallo MAU, On Sat, 22 May 2004 20:41:11 +0200GMT (22-5-04, 20:41 +0200, where I live), you wrote: C - Reply / Forward templates: according to the language used in the C original message. Forget about that. That's impossible. Without too much trouble I can M POPFile works a treat if you train it :) Sure, for English and Spanish, but that's easy. g,dr -- Groetjes, Roelof Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies or rabbits. Current version is 2.10.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html