Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Adding locale in url without changing link-to helpers

$
0
0

@varto1488 wrote:

This is example structure

@route 'lang', path: ':lang', ->
  @route 'index', path: '/'
  @route 'my-route'
  @route 'my-route-1'

  @route 'my-route-3', path: '/', ->
    @route 'my-subroute'
    @route 'my-subroute-1'

Before adding multilanguage

{{#link-to 'index' locale}}go{{/link-to}}
{{#link-to 'my-route' locale}}go here{{/link-to}}
{{#link-to 'my-route-3' locale}}go there{{/link-to}}
{{#link-to 'my-route-3.my-subroute' locale}}go there{{/link-to}}

Time consuming solution.

{{#link-to 'lang.index' locale}}go{{/link-to}}
{{#link-to 'lang.my-route' locale}}go here{{/link-to}}
{{#link-to 'lang.my-route-3' locale}}go there{{/link-to}}
{{#link-to 'lang.my-route-3.my-subroute' locale}}go there{{/link-to}}

Is there any better way to define prefix somewhere to be present always

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles