Mark, is there any way to get this to display the specified language if its field content exists, and to display the default language’s field content if not? This would be useful in a site where there is not always a translation for 100% of the content, which I imagine happens more often than not.
EDIT: Oops. I feel silly now. 😊 I just did some experimenting and it looks like that’s what the extension does. 😊
Ok, real question this time. :p Is there any way to have it pick up on related entries? For example, let’s say I have article-author (a relationship field) pointing to one entry, and article-author_jp (another relationship field) pointing to another entry altogether. The extension doesn’t seem to pick up and switch the field designated in the related_entries’ id=”” parameter, so it would always retrieve the fields from the entry designated in article-author, and never from article-author_jp.
First I want to thank you for this really very useful extension. Although I am a real newbe in Expression Engine and I am absolutely no code-writer (I use Freeway to have my templates made) I managed to get it working. That says a lot about the way you made this.
But I do have some questions.
I cannot get my page validated. And I noticed exactly the same error on another page that uses your extension .
The validator says:
Line 142, Column 34: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<ul class="simple-translator"><li class="selected first"><a href="http://ww
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as ">" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Another request, that might or might not be related.
Is it possible that for the next update you take away the hyphen in the part in the sourcecode that creates the style ? My software does not allow me to use something like ul.simple-translator (we must use ul.simpletranslator) So I had to add manually this part in my CSS stylesheet. There seems to be a very good reason why Freeway does not allow that, but I cannot explain that.
Hope to hear from you best regards
Atelier
First I want to thank you for this really very useful extension. Although I am a real newbe in Expression Engine and I am absolutely no code-writer (I use Freeway to have my templates made) I managed to get it working. That says a lot about the way you made this. But I do have some questions. I cannot get my page validated. And I noticed exactly the same error on another page that uses your extension . The validator says:Line 142, Column 34: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag. <ul class="simple-translator"><li class="selected first"><a href="http://ww The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as ">" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
I believe your problem is that a UL element should not be placed inside a P element. Generally a hierarchy would be UL -> LI -> P -> [text inside the P] (although the need for a P inside an LI is a matter of personal opinion and taste, I believe).
Thanks for replying.
We found the solution, after a lot of trial and error. In this case it did help by using a script-action that removes the p-tag from the container. For more info please have a look here: link to discussion .
But the result is that the page gets validated, and that MSIE 6 and 7 renders the code as we want.
I was wondering if any of you who use this extension already, how does Google spiders the alternate languages. Because the URLs are being obfuscated or just changed during access? Or maybe a search engine sitemap.xml could feature all links hardcoded with lang/_sk/ in their URLs (sk for slovak).
Any advice or info is welcome Thank you
Very good point…
Mark - how much work would it be to get the extension using a global variable in path.php as described here in the EE Wiki? (like ‘www.mydomain.com/en/group/template’ or ‘www.mydomain.com/fr/group/template’ etc..) I’ll have a look at the code… but I’ll probably just mangle it 😛
-Brent
Mark, I’ve run into a wall. I have custom fields for each weblog, and I’ve adopted a naming scheme of {WEBLOGNAME-body} for my custom fields, since EE requires a unique short name for custom fields, regardless of them being in different field groups.
The problem is when I want to have alternate languages for the {title} field. Normally I’d have custom fields named {title_jp} and be done with it, but since I have to have them named uniquely, and I want to have more than one weblog have alternate language content, Simple Translator obviously doesn’t pick up on the fact that {WEBLOGNAME-title_jp} should be substituted for the {title} field when the language is changed.
The only solution I can think of is to have an “if lang == jp show {WEBLOGNAME-title_jp} else show {title}” conditional in my templates, but it seems rather messy.
Any ideas?
Re; Categories
If I have 1 weblog with 10 entries and 1 set of categories called Cats and a corresponding set of categories called Cats_de, riddle me this:
or does ST just know to show the alternate category list and which cats in the foreign languages that the entries belong to?
Thanks
Hey Mark,
Is there a way to be able to translate weblog entries - variable pairs when using the suffix in the category group names (category / category_es) and not on the weblog names????
I need to use the following code and its displays the two languages:
{exp:weblog:entries weblog="weblog_name"}
{categories}
<h2>{category_name}</h2>
{/categories}
Re; Categories If I have 1 weblog with 10 entries and 1 set of categories called Cats and a corresponding set of categories called Cats_de, riddle me this: 1. Do both category groups have to be attached to the weblog in edit_groups? or just the english set of categories? 2. If the answer to #1 is both, do I need to select both the english and german category for each entry in the edit screen? or does ST just know to show the alternate category list and which cats in the foreign languages that the entries belong to? Thanks
Hey Chad,
Yes both category groups have to be attached to that one weblog and yes you need to select both, the English and German categories for each entry.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.