Giter Site home page Giter Site logo

silverstripe-languageprefix's Issues

404 on Homepage

I'm currently testing the prefixer but the homepage on the default langues is coming up as "Page not found." It works fine without the module. I'm using ss3.4 and here is my mysite/_config/config.yml

i18n :
  common_locales:
    en_CA: 
      name: 'English (Canada)'
      native: 'English (Canada)'
    en_AU: 
      name: 'English (Australia)'
      native: 'English (Australia)'

Translatable:
  enforce_global_unique_urls: false

---
Name: languageprefix-config

---
prefixconfig:
  locale_prefix_map:
    # 'en_GB': uk
    'en_US': us
    'en_CA': ca
  enable_duplicate_urlsegments: true
  disable_prefix_for_default_lang: true

Default locale is configured in _config.php as

i18n::set_locale('en_GB');
Translatable::set_default_locale('en_GB');

Any suggestions?

Inserting Link with HTML Editor

Hi,
when inserting a link to another page within my site with the HTML editor, I can choose the language in the popup helper window. But the wrong link is generated.
It will always point to my last langugage.
This might happen only when the last part of the url ist the same in all langugages for example:
/de/produkte/iphone5
/en/products/iphone5
/fr/produits/iphone5
No matter which language I choose, the generated link will always point to /fr/produits/iphone5

Environment: Silverstripe 3.1.2

How to hide the main language prefix

Is it possible to hide the main language prefix ?
For example, if the main language of my site is English, I would like url like http://www.mysite.com/about-us (wihout the prefix) and for the translation into French: http://www.mysite.com/fr/ a-propos.

For now, I have two urls:

  • http://www.mysite.com/en/about-us
  • http://www.mysite.com/fr/a-propos

enable_duplicate_urlsegments

After change the options on languageprefix.yml and do flush=all on homepage, when changing url segment of any page and press ok to update this value, the cms generate "-2" on end of name and never use the same url for differents languges

Silverstripe v: 3.6.2
php 7.0

URLSegment same on various languages -> another solution?

This is not really an issue, but more like a question what's best.

Doesn't enable_duplicate_urlsegments: true in this module do the same as the following setting for Translatable?

Config::inst()->update('Translatable', 'enforce_global_unique_urls', false);

I'm using the second one now in a website and it works, or will something else break?

release tagged versions

Could you please release tagged versions, so we can include them better in composer?

using "dev-master" just feels bad and is not safe to upgrade.

cannot call action on homepage

i made an action on my page_controller called "logout".

calling an url like "/logout/" or "/de/logout" results in a 404 beause PrefixModelAsController

a) handles all urls without prefix as 404 (maybe no bug but a feature)
b) doesn't check for actions on homepage.

"/de/home/logout/" works like a charm ;)

Multi-byte character strings immediately after language prefix cause a 404

Hi, First of all, thanks for this very handy module. It has been a big help when making multilingual sites. Unfortunately, I have two sites that are showing a similar problem on the site sections that use non-Roman characters in the URL. One site is English/Vietnamese using SS 3.0.5 and compatible versions of Translatable and LanguagePrefix modules. The other site is English/Thai using SS 3.1 stable with current downloads from the master branch of Translatable and LanguagePrefix modules. This problem is a little hard to describe since this comment box keeps changing UTF8 characters into code, so please imagine that the portions of the URL suffixed with (in-thai) are actually Thai characters.

Links like this do not work:
http://asia.mysite.com/thailand/th/page-name(in-thai)
http://asia.mysite.com/thailand/th/our-technology(in-thai)/page-name(in-thai)

However, links like this do work:
http://asia.mysite.com/thailand/th/page-name-th
http://asia.mysite.com/thailand/th/our-technology-th/page-name(in-thai)

Am I missing something obvious here, or is this actually a bug?

Thanks, Seth

Language prefix not used in CMS split view

Firstly, great module.

I have just come across an issue when the CMS is in split view when editing pages. When attempting to edit any page other than the homepage (in the default language), the preview area doesn't use the language prefix and therefore ends up with a 404, which in turn switches the page in the left hand side of the CMS to the 404 page not found.

For example, with the stock contact us page, the URL Segment is indicated as:

_mydomain.com/en/contact-us_

That is available via the front end using ?stage=[Stage|Live] and all is fine, however the URL that the preview area tries to load is:

_mydomain.com/contact-us?stage=Stage_

which results in a 404.

If the CMS is set in "edit" mode with no preview to the right, everything is fine. So, in order to edit anything, the preview functionality can't be used.

I've only just figured out what was going on so haven't had a chance to go searching for a potential fix, but thought I'd raise the issue anyway.

Use default locale without language prefix

Is it possible to set up the module to use the default locale when there is no language prefix?

For example, if I enter mysite.com/page/, and the default locale is en_US, it would display mysite.com/en_US/page.

Hope you understand what I need, since it's important for SEO.

Thanks,
Ivan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.