tx_news and multi-language - typo3-6.2.x

I'm using Typo3 6.2 and EXT tx_news in a multilingual installation (L=0 German, L=1 English, L=2 Italian, with more to come). Everything works fine if I make a newsrecord in standard-language and translate it via localization to the other languages.
Here the problem:
Some news should only be in one specific language, not necessarily the standard language.
But if I create a newsrecord telling it should be Italian for example, no pictures are shown in the FE, neither in list- nor in detail-view. The pics are in the record, marked as "Show at list-view" (maybe wrong translated, I'm using the BE in German), but in the outputted code, the news-image-wrap is empty:
<div class="news-img-wrap"> </div> == §0
Would be very pleased to get help here!

I don't think it is a problem of wrap.
It sounds like a problem of translation handling. dio you use translation or only multilanguage?
You might need a record in default-language with the option not to be shown but with the images for all languages.

Related

Switch to the another language on the same page?

I am trying to add a language changer for Middleman and it's not generating the correct link. My default and root is English.
url_for("/#{current_page.path}", locale: :ja)
I would expect the equivalent for the current page in JA which is the same URL with JA prepended. Does anyone know how to fix this?
I'm a middleman beginner, but after doing a bunch of Googling it seems like this is a fairly common issue. I've tried to look through the middleman sources to see if I could find a solution, but I've been unable. I'm kinda disappointed about this, because it looks like middleman has first-class support for localizations. Being unable to easily link from one to another seems like a surprising omission.
What I've done is make a little helper that can swap localizations in paths, if needed.
def change_locale_in_path(path, locale)
locale_prefix = I18n.locale
path.gsub(/^#{locale_prefix}/, locale.to_s)
end
This isn't a great solution, though. It will need to be adjusted if you change the i18n :path, and won't work unless you mount_at_root: false. But, it worked well enough for me to move on. I really would love to see a better solution.
I found a few GitHub issues that seem to reference this problem. Here's one.
I am using the following helper to generate a URL for the current page in a different language. It was originally based on this gist, and then tweaked it a bit so that it works regardless of whether mount_at_root is used.
def current_url_for_locale(loc)
url_regex = /\A\/(?:(#{I18n.available_locales.join('|')})\/)?/
locale_root = url_for('/', locale: loc)
current_page.url.gsub(url_regex, '').blank? ?
locale_root :
current_page.url.gsub(url_regex, locale_root)
end

Ektron 8.5 adding temporary paragraphs. Why?

We are running Ektron 8.50 SP2(Build 8.5.0.356) / eWebEditPro.
The issue we are seeing is when a smart form text field is left blank it is randomly filled with the following...
<Body>
<p title="temporary paragraph, click here to add a new paragraph"> </p
</Body>
Anyone else come across this?
I realize the most obvious 'next step' would be to upgrade. Unfortunately for many reasons this is not an option.
Any advice would be appreciated.
Thanks,
ozmo
You're right, the obvious answer is to upgrade. Ektron moved from eWebEditPro to Aloha as the editor of choice precisely because of issues like this that cropped up as they fought to strike the right balance between cleanliness and usability (prior to this issue, editors would complain that they couldn't get the cursor into the blank space as they wanted... it was a mess).
So my first question is: why can't you upgrade? Is it a business problem or a technology problem?
No other editor is going to be embeddable into the workarea besides, perhaps, their old ActiveX plugin that only works in IE and probably not some of the later versions.
So without an upgrade on the table, your only other options are to:
Edit outside of the workarea. This would require you to create and secure your own admin pages, but it would allow you to set up the form for input however you like and with whatever editor you like, as long as you XML encode any special characters (which is different from HTML encoding; note the 'space' above is   and not ).
Create an extension (aka "Content Strategy") which would do the clean-up you want as the item is being saved or published. Documentation for creating a strategy is in the Ektron docs, accessible through http://documentation.ektron.com (redirects to Episerver World, but to the page with links to the docs). You would have to create the strategy, insert your own logic, then add it to the site.
Let me know if there's more info I can provide. But I can't solve for this specific case since I don't have a comparable version of Ektron installed anywhere.

Gracenote API: Search and fetch contents in specific language

I'm wondering if there is a way to get data in specific language when using gracenote series_search or series_fetch methods.
It turns out that using ger field is useless... I still get data in english ...
If someone could help resolving this, that would be great! =)
Gracenote uses 3-letter ISO 639-2 codes to specify languages. The format is described at http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes - Gracenote supports most major languages.
Thanks to your suggestion, we've added this documentation to our page at: https://developer.gracenote.com/eyeq

Using elm for front end development + serving dynamic elm pages though haskell

I started with elm yesterday and I really enjoy using it. Without any experience in front end development I could build a nice looking webpage in only 30 lines of code, which is amazing.
Now I really want to use it in a real life example, I want to build a small blog.
But I need a way to communicate with elm. For example I need to query my database and I get a list of blog entries [Blog] and now I need to pass them to elm.
I am not sure how I would do it. I was looking though the popular haskell frameworks like yesod snap and happstack and the first thing that I found was http://hackage.haskell.org/package/snap-elm-0.1.1.2/docs/Snap-Elm.html
But it seems it is intended for serving static elm files, but I need to pass arguments to it.
Any framework that you would recommend me that already has elm support for serving dynamic elm pages?
And if not, how would you do it?
My idea was just to use elm as a skeleton and then I generate a normal html file with yesod snap or happstack and integrate this file into elm. Would this be possible?
Something that would look like this
container 1000 1000 middle <| displayHtml "/pages/my_generated_html_page.html"
Edit:
My first hacky solution was this
tPage = plainText "<script src=\"http://code.jquery.com/jquery-1.10.1.min.js\"></script>\n
<script> \n
$(function(){\n
$(\"#includedContent\).load(\"/home/maik/b.html\"); \n
});\n
</script> \n
<div id=\"includedContent\"></div>\n"
Unfortunately I am not allowed to use script tags in elm.
I recommend studying elm-lang.org's source code. The majority of it is pure Elm but there are pages that are generated on the server side with Haskell.

rails 3.1, How to manage URLs for a multilingual website?

I would like to know please, what is the recommended way to develop a website with two languages:
Arabic ( Right To Left )
English ( Left to Right )
URLs will have a two characters to specify the language, like:
www.domainname.com/ar/homepage or www.domainname.com/en/homepage
so, the router shall be able to add ar, en for each url ...
I know that I my controller should work for both languages, but, how to pick the right css for the chosen language ? is there a blog or tutorial for this case ?
Also, as for the data base, shall I add a field of content for each language ? what's the recommended approach for that ? for reading and writing ?
Any guidance will be more than appreciated!
I would use I18n and then scope the urls, but I suggest that you read this article on I18n, to get a firmer grasp of the concept.