Start a new topic

Insert search term into Multitran automatically?

Hi, 


I've never been able to get the Resource search to work with the resources I use the most (multitran, linguee, microsoft language portal). Is there a way to set this up so that I don't have to enter a search into the resources themselves?


Hello Alyssa,


Sure you can.


PREPARE THE RESOURCES


First, make sure your Web resources are set up so as to search for keywords instead of opening the website itself.


There is a Kbase article for that: https://cafetran.freshdesk.com/support/solutions/articles/6000110248-adding-a-web-resource-based-on-examples

but typically, when you add a website as a Web resource (Resources>Add web resource, or, after opening a web resource, Resources>Edit web resource, to check its settings), you want to add the URL to :


Address start:


If when you search for a keyword, the url address includes characters after the keyword, you add the code on the right of the keyword to:


Address end:


If the url is in Internet address, it simply opened the webpage and lets you browse or search within the page itself, which is what you don't want.


Example for Microsoft terminology (My pair is EN-FR):

Address start: https://www.microsoft.com/Language/en-us/Search.aspx?sString=

address end: &langID=fr-fr


Linguee (EN-FR):

Address start: https://www.linguee.com/english-french/search?source=auto&query=


Note: Linguee already has an entry in Cafetran, although you have to choose the language pair on the site before performing searches.


Multitran:

To find the url to use, go to http://www.multitran.ru

select the language you want and perform a search.

Copy the part of the URL  that goes up to the keyword (which you remove) to Address start

Then copy the part of the URL after the keyword to Address end.


CHECK THAT RESOURCES IS THE DEFAULT SCOPE (FOR SEARCH)


Press Ctrl+F to open the detailed Search/Replace window.

Make sure Default Scope is set to Resources on the right.

You can search through this window if you want but that's not the point here.


PERFORM RESOURCES SEARCH


Now you want to make a search.


Open a project, and open one or more web resources.


Make sure the Tab of the resource you want to use is highlighted.


Select with the keyboard or with the mouse the word or words you want to search (you can jump from target to source pane with F12, and the Tab key it is enabled in View>Segment editors).


Press Cltrl+Enter


The keyword search is made directly!


SOME TIPS: 


-You can enable a simultaneous search in all open web resources:

Make sure Resources>Simultaneous web search is ticked if you want to do that.


-You can easily navigate through the Tabs without using your mouse, just with the keyboard. Default shortcuts are: Ctrl+, to go left and Ctrl+. to go right (other actions found in View>Tabs).


Hope it helps!



1 person likes this

Hi Idim,


Thank you so much for the detailed explanation and apologies for the delay responding. I am now able to get the resource search to automatically fill in the search in the Ru-En direction. But there is a very weird side effect: Multitran does not recognize the Cyrillic (so I can not see the Russian search term, commentary, etc. and can not search going in the opposite direction). I am including screenshots of how this looks and how I set up the resource, as I followed your directions exactly and don't know what could have gone wrong.

Hello Alyssa,


Glad to know the above instructions helped you.


Please note the latest CT update changes the default Default Scope shortcut (from Ctrl+Enter to Ctrl+Shift+G and Ctrl+Enter is used to save segment and go to Next untranslated). You can change those shortcuts according to your preference in Preferences.


Now, for Multritran:

I created a resource with the data of your screenshot and it works fine for me (see the screenshot).

But I'm on Linux and UTF-8 is the default system encoding.

From your screenshot, it seems you're on a Mac.

Maybe a Mac user will chime in and provide a quick fix.


(NOTE: If you create a new resource with the latest CT versions, you get one more option, "Block javascript", which in Multritran seems to remove some annoying ads without removing functionality...)


My take:


- If you want to search in the opposite direction, I think you should create a separate resource, with the link for the language pair direction you want to use. You can save your resources in Folders, so for example, you can create a folder for Multitran in cafetran/infos/resources/Internet and specify the language pair in the title of the resource.


- You may want to try some different encoding, instead of UTF-8.

When I open www.multitran.ru in Firefox (in View encoding) I see it uses Windows Cyrillic.

I think that is Windows-1251.


So what you can try :


Find the url for searches in the language pair direction you want on a browser and add the resource in CafeTran.

If it does not work with UTF-8, Edit the resource and put Windows-1251.

You need to close the resource Tab in CafeTran and reopen it when you have made changes to it.


If it still does not work, some other encoding to try (apart from Windows-1251):

ISO-8859-5

KOI8-R

MacCyrillic


If it does not work, I hope a Mac that writers in Cyrillic (or Igor) can provide a solution. 


Lastly, you can skip the address in Internet address if you do not want CT to open the website without making a Resource search. Otherwise, this method (adding the url to Internet address while also filling the address End and Start combines both, which is also good.)

I have just checked the display of Multitran web resource on Mac OS X (macOS Sierra). It looks all right with the default UTF-8 encoding set in the resource info. Perhaps it depends on the specific operating system encoding set? 

Okay, I think I found the cause. Please edit resource info for this web resource and uncheck the POST method box. Then, close and reopen the resource in the tab. 

Thank you! (it was indeed the POST method box fix) :)

Login to post a comment