Error: The language resource file could not be located.

I am trying to build a standalone app based on the sample project "Sdl.SDK.LanguagePlatform.Samples.TmLookup". When I try to do a concordance search in an existing TM, the following code is generating an exception:

results = Connector.fileTm.LanguageDirection.SearchText(GetSearchSettings(target), searchText);

The exception is:

LanguageResourceFileNotFound    160    The language resource file could not be located.

I am able to access the TM and read the number of translations units as follows:

Connector.fileTm.GetTranslationUnitCount().ToString()

Any ideas what the problem could be? I thought it might be a permissions problem, so I moved the TM into the same directory as the C# app, but I get the same error.

EDIT: I just realized I might be misunderstanding what a "language resource" is. I thought it was the TM itself, but it is actually "a set of settings in a translation memory" (http://producthelp.sdl.com/glossary/en/glossary.shtml#language%20resource).

Thanks,

Gary

Parents Reply
  • Hi Andreas,

    I tried moving the whole C# project to "C:\Program Files (x86)\SDL\SDL Trados Studio\Studio5" and running it from there, but I still get the same error. Is that the correct "Studio installation folder"?

    I also tried attaching a language resource to the TM (described here: ), but I get a similar error:

    The type initializer for 'Sdl.LanguagePlatform.TranslationMemoryApi.DefaultLanguageResourceProvider' threw an exception. ---> Sdl.Core.LanguageProcessing.LanguageProcessingException: The language resource file could not be located.

    Anyway, it seems like a strong limitation to not be able to create a standalone app anywhere on the machine.

    Thanks, Gary

Children