Search code examples
c#localizationflexpaper

FlexPaper Localization Not Working


Sorry if this question is out of context, but I don't know where else to look and StackOverflow tends to provide the best support. I'm having a problem with FlexPaper not loading the locale for HTML rendering option. It appears to be working for Flash version with no problem, but not for the HTML viewer specifically.

Here is the config which loads the control onto a page:

var searchServiceUrl = escape(ashxDir + "containstext.ashx?doc=" + guid + "&page=[page]&searchterm=[searchterm]"), 
 docUrl = escape("{" + ashxDir + "view.ashx?guid=" + guid + "&numPages=" + numPages +"&format={format}&page=[*,0]," + numPages + "}"),
 configObj = {
  DOC: docUrl,
  ...
  DocSizeQueryService: ashxDir + "swfsize.ashx?doc=" + guid,
  jsDirectory: "/FlexPaper/js/",
  JSONDataType: "jsonp",
  localeDirectory: "/FlexPaper/locale/",
  localeChain: "en_US"
 };

This is exactly how I've found it while looking through documentation and everything else, but it simply does not work for me. I've scoured the internet and nobody else seems to have this problem. Unfortunately when I click on the print button all of my labels and buttons show 'null'. Here is a screenshot of what I get when I try to load the page in the HTML viewer:

Null localized strings

If you notice in my configuration above, the localeDirectory is set as a sibling directory of the js directory. The locale directory has all of the valid directories under it which hold the localized strings for various languages (ie. en_US, zh_CN, etc..). I've even tried moving the locale directory around the system to see if it is expecting a different "root", but again to no avail...

Any information would be greatly appreciated.


Solution

  • We found the problem and I realize that I never updated the case with the 'Answer'. The fix was directly related to a wrong url which fed the localized strings to the dialog. We were only able to track it down by interrogating the HTTP Request using Chrome Web Tools. It wasn't a complex fix, but it proved to be a complex issue to track down and diagnose properly.

    Hope this helps someone someday.