I want to create a website with the refinerycms and now I have a question.
I have 4 domains for my website.
mydomain.at
mydomain.de
mydomain.ch
mydomain.com
In the beginning there only will be a german translation.
Now my question:
Option 1:
I do a redirect to mydomain.com and "map" the domains to:
mydomain.com/de-at
mydomain.com/de-de
mydomain.com/de-ch
dependent on the country where the website is called.
Option 2:
I do not make a redirect an just show the content in the TLD. I just do a redirect dependent on the country, where the website is called.
For example website gets called in Germany over mydomain.at => I will redirect to mydomain.de
Now my question: How could I implement one of these options within the scope of the refinerycms?
I know the refinerycms-i18n gem and I also know the frontend locales and the normal "stuff". But I did not find anything about "multiple-same-languages" like "de-at", "de-de" and "de-ch". Because in the end all these translations are only one german translation, but the customer wants to specify the "sub-language" to make it more personal..
Anybody an idea?
Related
I’m trying to create a Drupal 8 website with multi-country selection and more languages available for each Country.
For example, the visitor can select Belgium as his Country, then he should be able to select one of the languages related to Belgium: French and German, plus English (which should be available for all Countries).
I’ve installed two modules: Domain Access and Country Path.
Domain Access allow me to define different domains and sub-domains like fr.domain.com, it.domain.com, etc.
Using Country Path I should be able to create different path for the same domain based on Country selection, like domain.com/france, domain.com/italy etc. But unfortunately it’s not working properly…
Using sub-domains is not possible for my project and, even configuring Country Path, if I go to domain.com/france I always get a page not found error.
What I need in the end is this path/url structure: domain/country/language, like for example domain.com/belgium/fr or domain.com/belgium/en.
Do you had any experience with this situation? Any idea or suggestion about modules to try or core configurations that can solve this?
You should definitely try Internationalization module.
It will provide you with content translation,different path for the same domain based on Country selection and language switcher block.
default looking language switcher
Is it possible to create urls for category as subdomain, for example now it is:
mystore.com/category
I would like it to be
category.mystore.com
I know there is multistore option, so I could create more websites and set root directory for every category, but there would be problem with cart sharing, next thing is site is has 2 languages - so I'm using multi store for site translation
There's no way to achieve this out of the box, but this can be done using a custom router. Create a custom router and insert it before the standard router. In your custom router, check the subdomain of the request. If it matches a category URL key (or whatever other criteria you'd like to use), rewrite the request to that of a standard category page (i.e. /catalog/category/view/id/123/). Keep in mind that your users will probably leave the subdomain when they click on a link because your base URL will not include the category-specific subdomain. Take a look at Mage_Cms_Controller_Router as an example of a custom router.
I have a magento shop with 2 languages. The language switcher works with set a different store view in the url.
/shop/?___store=myshop_view for mainlanguage
/shop/?___store=myshop_view_fr for french
That works fine and how it should work.
Now first problem comes when I am in french store and switch to mainlanguage with /shop/?___store=myshop_view, now I see the shop in the mainlanguage, but when I call /shop/ without any storeview paramenters it switches back to french. Why is that and can I change that?
The second problem comes with externall add to card links. A add to card link would look like: /shop/checkout/cart/add/uenc/aHR0cDovL3d3dy5teS13aW5lLmNoLnJ1dGlzaGF1c2VyLm5pbmUuY2gv/product/2169/?___SID=U&___store=myshop_view
So this link is for the main language. If the shop was in french before and I click this link, i get the success message in the main language, but the rest of the shop is french again.
I think the first and second problem are nearly the same. Then the add to card link will redirect to the shop overview without any store view paramenter in the url.
Any idea how I can get a add to card link that can switch the language of the shop?
As #RohitS said. Magento saves the storeview in the cookie, and with the url you can change the storeview temporary, but the value in the cookie is still the same.
Good thing is, that the external add to card link is on a subdomain, so I was able to set the cookie for the hole domain (by adding a dot before the domain name: .domain.com). In the cookie I just had to set document.cookie = "store=myshop_view_fr;path=/;domain=.my-shop.com"; The path attribute was important for me, cause the shop is in /shop/.
This is what I’m trying to achieve on our dedicated server (Direct Admin):
1 Magento (1.6.2.0)
1 catalog
3 domains
domain.nl (is main and has the magento files)
domain.de (is domain alias, not Virtual Host, has no files at all)
domain.se (is domain alias, not Virtual Host, has no files at all)
3 languages
Dutch
German
Swedish
Shared Shopping Cart
SSL on Chekout
Let’s say a Dutch visitor is typing “product X” in Google and finds his product on our German site (domain.de). He adds it to the cart and likes to continue in Dutch. So he clicks the Dutch flag and should be able to checkout on domain.nl.
I tried a couple of things with the language. One way I had 3 websites, 1 for each domain and all with 3 stores, one for each language. So 9 stores and views in total. This was the only way I could get the flags showing. But most of the time the flag image was not showing because the code of the view had to be the 2 letter country code, which can only used once. And when I changed language (thus domain), the cart was not shared.
The other way I had 1 Website with 3 stores, one store and view for each language/domain. But in this case the language selector (flags) where not showing at all.
I’ve been reading allot about this. But all the (mostly old) topics or article I found are about a single subject and so different from each other that I cannot combine them into one.
Thanks for any help!!
Cheers,
Robert
I have played with this concept a bit and I believe this is how you would do it. Under Magento Admin->System->Manage Stores you would set up the following.
One Website (most likely Main Website)
One Store
Three Store Views (One for each language)
Then you will swing into System->Configuration. Select each specific language in the "Current Configuration Scope" then change General->Web->Unsecure->Base URL and General->Web->Secure->Base URL to the URL you want to use for each store. i.e. Your German configuration should not use the Website Setting and should be set to domain.de instead.
For each of your virtual hosts, configure them to all point to your single Magento install. When they come in with the specific URL Magento should route them to the proper language version and, if they select a flag, it should change to the other URL for that language.
Give this a try and let me know what your results are. I have only lightly played with this and have referenced these topics. I agree with you that this is an area that sometimes has too many ways it can be configured and not enough recommended ways.
http://www.magentocommerce.com/boards/viewthread/227246/
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/navigation/multiple-website-setup
Do you know any plugin that redirects only users to certain store based on the IP (geolocation)?
I have found theese two:
http://www.magentocommerce.com/magento-connect/store-and-currency-auto-switcher.html
http://www.magentocommerce.com/magento-connect/j2t-geoloc-va-automatic-store-and-currency-switch.html
but the problem is that they change also the currency and not only the store.
As an alternative does anyone know a simple coding method to do that? (I should mention that I do not have any knowledge of geolocation so I did not try any coding at all yet)
Thank you,
Mugur
Take a look at your index.php and see how it loads a website/store.
It is relatively simple to install a geoip module on both Apache and Nginx, this module will then enable you to have a $_SERVER value for country code. You can then place a simple php switch/case block in your index.php that sets the website/store values used to call Mage.php and have whatever logic in there to suit your setup.
I don't believe the module route (even if one exists) is what you need given how straightforward it is to write the switch/case for your country->store mappings. You will also need to put in there some extra option for testing purposes, e.g. if the IP address requesting the page is your PC then show whatever store it is you need to test.
Anyway, you can always chose one of Magento's free extensions.
Geo Lock or Geo IP Locations are free and restricted versions of the first extension you linked.