Questions tagged [localization]

Locales and multi-lingual translations.

Filter by
Sorted by
Tagged with
19
votes
1answer
6k views

How do I output the locale’s name?

When I output {{ craft.locale }} in my template, I get the current locale’s ID (e.g. “en”) rather than its name (e.g. “English”). How do I get the locale’s name?
15
votes
2answers
3k views

How do I create a locale dropdown to switch between languages?

I’m trying to create a dropdown menu to switch between language’s on my site. I am currently doing this with this snippet found on the google plus community: {% block locale__switch %} {# Loop ...
8
votes
2answers
323 views

Locale Switch not Affecting News Index Template

So I have successfully set up two locales on my site, with a button to switch between, this works fine for all the sections that have the langauges set, but I cannot seem to get it to work for the ...
5
votes
2answers
3k views

Locales sub directories on Nginx

I'm trying to get a basic locals sub directory system working on Nginx: /entry - en local. /fr/entry - french translation. /it/entry ect.. Having read this knowledge base article and some other ...
2
votes
2answers
630 views

Why do the plugin resource paths include the localization prefix?

I'm using Craft in a multilingual setup with the Smart Map plugin. However, the CSS and JavaScript files are not being linked properly when the site isn't in the main language. For some reason, the ...
3
votes
1answer
221 views

Storing multilingual content that is used across sections

I'm new to Craft, but starting off with building a multilingual site. I wonder what is best practice for storing multilingual content that is used accross sections (i.e. site navigation headings, ...
2
votes
1answer
499 views

How to translate the whole page?

Ok so I know this is something really basic but unfortunately i could not find it in the documentation and I don't have a lot of experience with localisation at all. i have set up two locales in my ...
6
votes
1answer
263 views

Fields applied to the User area are not translatable?

I have a site which allows people to register as a member from the front end. I've got a bunch of fields attached to the User so that each person can build their own extended profile page; the site is ...
6
votes
1answer
724 views

How do I get the right entry data based on locale and slug?

My site has 2 locales: en_us and nl_nl. I also have a Structure section called Pages, which targets both locales. For each locale, the section has an Entry URL Format: en_us: en/{slug} nl_nl: nl/{...
4
votes
2answers
803 views

Is it possible to manage language translations without directly accessing the PHP translations file?

It is beautifully described in the docs how to translate static text using translation files. As the client has no access to that file and managing a php array is not what I want them to do, I am ...
4
votes
1answer
305 views

What's that |t - filter for?

I found this part of code in the documentation {% set title = "Cocktail Recipes"|t %} What does |t mean there?
25
votes
10answers
7k views

How can I build a language switcher?

I'm currently building a site with two languages, and I need a language switcher so wherever you enter the website you can switch the language easily. I've come this far: {% for locale in craft.i18n....
9
votes
3answers
1k views

What accurately will set asset paths for multilingual sites?

This is actually a fairly crucial matter, since relative paths definitely won't work with languages, unless you really want all assets in a given Source to be localized or at least copied to each ...

1
4 5 6 7
8