subject: serverside delievery of appropriate language-sense pageversion worsened searchengine ranking

neue medienordnung plus
  last edited: Fri, 29 Sep 2017 08:42:22 +0200  
FYI: Use of one url for two or more languages with serverside delievery of appropriate language-sense pageversion worsened searchengine ranking. S. also "Make sure each language version is easily discoverable" - https://support.google.com/webmasters/answer/182192?hl=en

Keep the content for each language on separate URLs. Don’t use cookies to show translated versions of the page. Consider cross-linking each language version of a page. That way, a French user who lands on the German version of your page can get to the right language version with a single click.

Avoid automatic redirection based on the user’s perceived language. These redirections could prevent users (and search engines) from viewing all the versions of your site.

@Andrew Manning @Hubzilla Development+ @Hubzilla Support Forum+ #switch #browsersniffing #BrowserDetection #Browserweiche #sniffing #languagesensitive #serverside #seo #search #searchengine #sumo
Andrew
 
dev.hubzilla.org is now at dev branch commit 31d9208.

Here's an example of what changed for the Page module:



diff --git a/Zotlabs/Module/Page.php b/Zotlabs/Module/Page.php
index 6ef285d..7bc90c0 100644
--- a/Zotlabs/Module/Page.php
+++ b/Zotlabs/Module/Page.php
@@ -43,11 +43,31 @@ class Page extends \Zotlabs\Web\Controller {
    
        $channel_address = argv(1);
    
+        // Always look first for the page name prefixed by the observer language; for instance page/nickname/de/foo
+        // followed by page/nickname/foo if that is not found.
+        // If your browser language is de and you want to access the default in this case,
+        // use page/nickname/-/foo to over-ride the language and access only the page with pagelink of 'foo'
+
+        $page_name = '';
+        $ignore_language = false;
+
+        for($x = 2; $x < argc(); $x ++) {
+            if($page_name === '' && argv($x) === '-') {
+                $ignore_language = true;
+                continue;
+            }
+            if($page_name)
+                $page_name .= '/';
+            $page_name .= argv($x);
+        }
+
+
        // The page link title was stored in a urlencoded format
        // php or the browser may/will have decoded it, so re-encode it for our search
    
-        $page_id = urlencode(argv(2));
-    
+        $page_id = urlencode($page_name);
+        $lang_page_id = urlencode(\App::$language . '/' . $page_name);
+
        $u = q("select channel_id from channel where channel_address = '%s' limit 1",
            dbesc($channel_address)
        );
@@ -64,16 +84,31 @@ class Page extends \Zotlabs\Web\Controller {
    
        require_once('include/security.php');
        $sql_options = item_permissions_sql($u[0]['channel_id']);
-    
-        $r = q("select item.* from item left join iconfig on item.id = iconfig.iid
-            where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s' and item.item_delayed = 0
-            and (( iconfig.k = 'WEBPAGE' and item_type = %d )
-            OR ( iconfig.k = 'PDL' AND item_type = %d )) $sql_options $revision limit 1",
-            intval($u[0]['channel_id']),
-            dbesc($page_id),
-            intval(ITEM_TYPE_WEBPAGE),
-            intval(ITEM_TYPE_PDL)
-        );
+
+        $r = null;    
+
+        if(! $ignore_language) {
+            $r = q("select item.* from item left join iconfig on item.id = iconfig.iid
+                where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s' and item.item_delayed = 0
+                and (( iconfig.k = 'WEBPAGE' and item_type = %d )
+                OR ( iconfig.k = 'PDL' AND item_type = %d )) $sql_options $revision limit 1",
+                intval($u[0]['channel_id']),
+                dbesc($lang_page_id),
+                intval(ITEM_TYPE_WEBPAGE),
+                intval(ITEM_TYPE_PDL)
+            );
+        }
+        if(! $r) {
+            $r = q("select item.* from item left join iconfig on item.id = iconfig.iid
+                where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s' and item.item_delayed = 0
+                and (( iconfig.k = 'WEBPAGE' and item_type = %d )
+                OR ( iconfig.k = 'PDL' AND item_type = %d )) $sql_options $revision limit 1",
+                intval($u[0]['channel_id']),
+                dbesc($page_id),
+                intval(ITEM_TYPE_WEBPAGE),
+                intval(ITEM_TYPE_PDL)
+            );
+        }
        if(! $r) {
    
            // Check again with no permissions clause to see if it is a permissions issue
neue medienordnung plus
  last edited: Fri, 26 May 2017 10:04:37 +0200  
@Mike Macgirvin
If you want to translate a webpage 'foo' into German you just create a page called 'de/foo' and translate the page.

I mean, for search friendly, SEO-optimized URL's is it inpossible for all languages same address foo to use. URL-value, keywords in URL's are important for pageranking - s. Therefore is it important, that URL contains keywords, suitably for respective language in each page.
neue medienordnung plus
  
I included the solution "Support for publishing of search engine friendly multilinguage content" in my speech/ presentation Hubzilla - introduction, possibilities, Hubzilla community - in three languages ;-) http://hub2.sprechrun.de/page/hucope/hubzilla_tools_page_en
data model for multilingual website https://hubzilla.org

neue medienordnung plus
  last edited: Mon, 22 May 2017 05:14:22 +0200  
@Andrew Manning @Hubzilla Development+ Would we maybe use this model one channel for each website-language ?
Benefit of this "one channel for each website-language"-model is in my assessment, that:
  • all language-specific website-files are neatly arranged and the files can tidy import/export for each language-edition
  • each language-Team is responsible for own language-channel, for example en/de/ru/ ...
Notices:
  • Links in hubzilla-project-navbar -block must in this data model language-specific changed
  • The wrong layout in websites 1-3 is here not the matter. Here it is about data model for the language-sensitive website.
Edit 05-21-2017
Another advantage is that is it helpful for Hubzilla-Ranking in SERP , when each laanguage-Pages get one separate URL - s. to that subject: serverside delievery of appropriate lang-sense pageversion worsened searchengine ranking


#languageSensitive #datamodel #hubzillawebsite
Andrew
  
Oh that may be true but Ich weisse nicht. Do you know how to search the source code? Perfect pristine documentation is always the ideal, but in practice many questions can be rather easily answered by using an IDE like NetBeans to search the Hubzilla code.
neue medienordnung plus
  
The perfect case would be, when I choice had one Comanche training/ webinar to absolve :).
hEARt PhoniX
  
It's not that hard. I will think about an online course.
#toDo for next weekend, starting on Wednesday.
content on language-sensitive Hubzilla-Homepage

neue medienordnung plus
  last edited: Sat, 22 Apr 2017 13:31:22 +0200  
Is it consent, that the content on language-localized https://project.hubzilla.org/page/hubzilla/hubzilla-project -Homepage mustn't a simple translation of english content are? I suggest this content - Hubzilla short-presentation on Hubzilla-Homepage - for cultural distinctiveness to adapt. For example significance and sensitivity, understanding for data privacy are in German qualitative different of these in USA or elsewhere.

@Hubzilla Support Forum+ @DE Übersetzungen+ @Deutschsprachige Nutzer+

#localized  #HomepageLocalized #LocalizedHomepage #languageSensitive
Andrew
  
I'll have to think about that. I'm not sure it's a good idea to have significant differences in the content when it comes to the Hubzilla software project itself. If you want to address very German-specific issues such as particular laws, etc, perhaps we should have an explicit section for that. Here's a thought: we can have one of those language selector menu items in the nav bar. When you select a language (or the page automatically sets to your browser language), then you get the same content but translated to your language, except for a specific section that has region-specific content if that makes sense. So if the language is German, that local section could discuss how Hubzilla fits into German law or whatever, but we'd want to make it clear that this kind of information is not an official part of the Hubzilla software project.
Mike Macgirvin
  
Targeting the customer is one of the first rules of advertising. It is no different in concept than Pepsi-Cola changing all their ad copy to "with your mates" rather than "with your friends" when advertising something in Australia.  If you use the latter version in Australia, most viewers instantly turn off to the ad because it is selling the product to a completely different culture. You also don't see new cars negotiating the streets of Los Angeles or through the Rockies. You see them driving through Melbourne or the outback. The Germans are (rightly) proud of their privacy legislation. This is important to acknowledge when pitching a communications project to that audience.

@Andrew Manning has the final decision in any case but I'm just throwing in my 0 cents. (In Australia all prices are rounded to the nearest AUD 0.05.)
paulfree14
  
Image/photo