Oh, um, never mind on one point -- I was complaining below about having URLs like http://www.jroller.com/gmazza/en/entry/myblogentry and http://www.jroller.com/gmazza/entry/myblogentry splitting Google Analytics results, I just realized *I* can turn off the multiple languages option myself, and then "/en/" version no longer is a valid URL, so that problem is solved for me (I thought it was JRoller that specified at an admin-level the multiple languages option, and so I was stuck with duplicate URLs as a result.)

I guess we can keep adding the /lang/ portion then, the idea is that you can tell people to go to http://www.jroller.com/gmazza/en/entry to see English articles and http://www.jroller.com/gmazza/de/entry to see German ones. I personally would rather do separate blogs http://www.jroller.com/gmazza and http://www.jroller.com/gmazza_de to keep the URLs simpler. What do you expect to be doing for your own blog?

Glen


On 07/29/2013 04:03 PM, Glen Mazza wrote:
Thanks for offering to help -- note you can also use Google Custom Search Engine for your blog: https://www.google.com/cse/ if you feel it would be too much effort getting Roller the way you would like it.

Incidentally, even if we support multiple languages in Roller, do you think we should still be inserting /en/, /de/, /fr/, etc. in the URLs anyway? I would guess the original idea for them was so I can do /en/greatcompanynews and /de/greatcompanynews for the same blog entry, just a different language, but as I mentioned below Roller already forces uniqueness on the "greatcompanynews" part, so that won't work. Also, as I mentioned earlier I could imagine the vast majority of people *not* wanting their Google Analytics data split between /en/entry/greatcompanynews and simple entry/greatcompanynews. (Roller came before Google Analytics, so the original /de/ and /en/ stuff wouldn't have mattered back then.)

I think it's also a poor idea to blog in different languages within the same blog (instead of having two blogs in two different languages, as Roller fully supports individual users creating multiple blogs) because with a blog you're trying to create a warm friendly connection with your readers, but it's off-putting to your readers when you're blogging frequently in a language they can't understand. WDYT?

Regards,
Glen


On 07/29/2013 03:38 PM, Maciej Rumianowski wrote:
Hi Glen.

2013/7/29 Glen Mazza <glen.ma...@gmail.com>

Hi Maciej!  Thanks again for your help! I just updated Roller to Lucene
4.4.0 to make sure you have the latest and greatest tools available.
Great, I saw that ;)


On 07/29/2013 09:43 AM, Maciej Rumianowski wrote:

Hi *,

I have analyzed how searching works with "I publish my weblog in multiple
languages" set to true.
Main problem is that search results have links to Entry page with no
locale or the same locale as on Search Page (
http://localhost:8083/roller/**test/en/search?q=post<http://localhost:8083/roller/test/en/search?q=post>).
This makes links broken if they are in different locale.

I reproduced that on trunk.  However (thankfully) entry URLs are all
unique regardless of the language they're in. For example, if you create two blog entries with both the same title "test blog entry" but one is in
French and the other in German, the URLs generated will be
entry/test_blog_article and entry/test_blog_article1 (as well as the
alternatives fr/entry/test_blog_article and de/entry/test_blog_article1;
swapping the de and fr in the preceding URLs will return 404s as you've
noted.)

One simple solution, if we don't care to provide a search-by-language
option, is to just strip out the locale from the search results URLs, get
rid of the /fr/ and /de/, that will fix the broken links.
Could be, but there some info lost:
1. Locale when going to entry (default locale will be applied for messages) 2. Mix of url (with and without locales) in Google Analytics as in comment https://issues.apache.org/jira/browse/ROL-1964?focusedCommentId=13719466&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13719466

However, stripping locale will preserve backward compatibility, because
before fix "ROL-1964: Have SearchServlet retain locale."
*1507039*<http://svn.apache.org/viewvc?view=revision&revision=1507039>
On Search Page there where always non locale urls.



As a fix I did this:
1. Enabled searching by language (Field in Index) - Index needs to be
rebuild
2. Added "public String entry(WeblogEntryWrapper entry)" to URLModel to
enable returning links to entries with their locale; and changed
accordingly basic theme _day.vm template

But the template changes only if someone's specified that they publish in multiple languages (as I hope?), i.e. no language drop down for monolingual
blogs?

Yes. I change the behaviour only when "I publish my weblog in multiple
languages" is set to true. So monolingual blog should not have any changes
in url, searches etc.

Just as the new blog entry page has a choose language drop-down only if you
make that specification. Also, I suspect the main blog front page should *not* have a language dropdown option (maybe it can be a template that a user can customize his blog with, but it won't be the default), as few will use it and adds unwanted clutter; however, the search results page for a
multilinguage page can have that language drop-down, defaulted to "any
language" -- how does that sound?

Search form on main page have a hidden input with locale of the page or if
there is no locale then input is not added to form.
Language chooser is in the SearchAgain form which is shown mainly on Search
Page and is shown only if blog isEnableMultiLang.
The idea with additional theme sounds interesting and I will check it.

[There's one more bug, if you had the time to look at it that would be
great. When I'm on the search results page and search on "dog", I'll get the articles with "dog" in it but with no word highlighting in the text. Staying on the search results page, if I query "cat", I'll get the cat articles, but the word "dog" will be highlighted whereever it appears in the cat articles. If I next search on "horse", I get the horse articles
with the word "cat" highlighted, etc., etc.]

Okay I can take a look at this one. :) As soon as I finished locale
searches, because this one is for my future site.

Best Regards,
     Maciej



Reply via email to