Skip to main content

Questions tagged [localization]

Locales and multi-lingual translations.

Filter by
Sorted by
Tagged with
1 vote
0 answers
84 views

Idea for matrix alternative for multisite setup. Feedback needed!

We have a site that has relied heavily on the use of matrix fields to act as a content builder for several pages on our site. We are now in the process of localizing the content, and have set up ...
jsun's user avatar
  • 113
1 vote
1 answer
126 views

table field - make one culumn translatable, other common for all languages

Lets say i have table field with product technical specification - two columns, one for feature name, one for feature value. Feature name (for example - "weight") needs to be translated across ...
Ded Nolyxeux's user avatar
4 votes
1 answer
1k views

Getting full native language name in Craft 3 language switcher

I'm porting across a multilingual project from Craft2 to Craft3 and have to rebuild the language switcher. I was previously using the .nativeName method but apparently this is deprecated. I've got a ...
Dr_Codswallop's user avatar
2 votes
1 answer
134 views

Craft 2 categories locale issue

I have a craft2 site running quite happily with 8 languages. I noticed recently that a dropdown selection of category entries is not working when the locale is changed to chinese (locale = 'zh'). So ...
joomkit's user avatar
  • 2,034
3 votes
1 answer
964 views

What is the difference between the Translation Methods when creating a new site

I am creating a new multi-lingual site and the documentation does not explain the difference between the options in the translation method dropdown. What is different for each of these and when is it ...
CreateSean's user avatar
  • 1,983
2 votes
1 answer
223 views

Adding or overriding locales in Craft 3

I am looking for a way to add new locale files or override existing ones. Basically a Craft 3 version of this: https://craftcms.com/support/adding-additional-locales I've tried the way described ...
MarkSmits's user avatar
  • 133
3 votes
1 answer
305 views

Is there some way to create sections inside static translations? (craft v3)

At the moment I'm converting a website from a different CMS to Craft v3. The 'old' CMS had a convenient way to set a hierarchy for static translations in yaml files so that we could split translations ...
Friksel's user avatar
  • 180
1 vote
0 answers
212 views

Access array from the static translation file

This is the scenario: I need the translations strings in both Twig and JS (For React). Of course I'm covered in the Twig part., and I don't want to maintain two different files (php and json). So I've ...
Jorge Anzola's user avatar
1 vote
0 answers
41 views

Multilingual blog, but only for some entries in a section, otherwise default to English

My client has an English blog but wants a few of the posts to be available in German too. How would I set things up so that the German version of the blog shows the German version of a post where ...
James Greig's user avatar
2 votes
1 answer
793 views

Get globals from other sites

How would I get the global variables associated to other sites? For example, in an instance where I have three websites under the group languages for the English, Spanish, and French versions. I have ...
cballenar's user avatar
  • 1,409
1 vote
1 answer
589 views

Group Sites by Groups

We have many country websites on different continents. In the CP we group the sites, where the group has the name of the continent. Now we want to group the sites in the templates in the same way. I ...
John Stevens's user avatar
0 votes
1 answer
74 views

Creating a new locale on craft 2, entries won't load

I have an issue creating a new locale, I already have two set up 'en_gb' and 'en_au' and have added a third 'fr'. I have added the new locale to general.php: '.com' => array( 'siteUrl' => ...
dmatthams's user avatar
  • 2,492
1 vote
2 answers
633 views

Way for clients to edit translation file(s) in control panel?

We have some navigation links being translated via the /translations folder but the client needs the ability to change them too... Is there a way to make the translations editable from the control ...
James Greig's user avatar
1 vote
1 answer
217 views

Locale URL segment being duplicated, eg https://website.test/en/en/

Problem I have a problem on a local Valet setup: the locale URL segment is appearing twice in URLs. Eg from a page at URL of en/about/approach, {{ url('about/approach')}} outputs https://website....
James Greig's user avatar
1 vote
1 answer
211 views

Dynamic link to same entry but in alternate language

I'm working on a multilingual website (Spanish and English, default is Spanish). I'm using the SEOmatic plugin, and I see that it generates this code: <link rel="alternate" hreflang="es" href="...
Sebastián.'s user avatar
1 vote
1 answer
204 views

Craft 2: Serve language / locale i18n according to user agent

As the official documentation does not give any hints on this: I am wondering how to serve the correct localization of my website according to the user’s language preference and/or browser/OS ...
Tobias S.'s user avatar
  • 117
0 votes
1 answer
149 views

Craft 2: Locale throwing 404 in frontend

I have my two locales set up as described in the official documentation. I am able to translate my pages and fields in the CP as supposed to and have two versions ready in the backend, both with a ...
Tobias S.'s user avatar
  • 117
1 vote
0 answers
37 views

Craft 2: New locale introduction not affecting old entries

I just introduced a new (2nd) locale to my site. It now seems I can easily set up translated versions for "single" and "channel" pages that I set up new. The old entries, which existed prior to ...
Tobias S.'s user avatar
  • 117
1 vote
1 answer
62 views

Problem with switch statement in language picker - [Solved] [closed]

I made a language picker, it works in one language but not in other. I want to get the current page of other locale. {% set locale = craft.i18n.getCurrentLocale() %} {% switch locale %} {% case ...
orionlogic's user avatar
2 votes
1 answer
70 views

Sprout Email Plugin and Multilanguage. How to translate SubjectLine?

I use Sprout Email on a website to send transactional email (about 15 different types). The website gets now translated to 3 languages (DE/FR/EN). It is all fine, but of course, also the ...
exophunk's user avatar
  • 383
1 vote
1 answer
297 views

Translating Static Text in Craft3

I know that static text translations in still possible but where you put those translations has changed. According to the documentation the folder structure should look like this: translations/ en-...
Danielle Frappier's user avatar
0 votes
0 answers
230 views

Confused by template and URI settings for multi-lingual sites

I have 2 x sites with base URLs set to @web/en/ and @web/de/ For client entries in a "Clients" section, I have a template at templates/clients/_entry.twig which I want to use for both sites. What ...
James Greig's user avatar
2 votes
1 answer
544 views

Struggling with language switcher for Craft 3

I am using SEOmatic helper class to get localizedUrls which is making life much easier! I would like to only display the localizedurl if the current entry is enable on that site. Below is what I have, ...
Danielle Frappier's user avatar
2 votes
0 answers
77 views

Multi-language, how Craft determines the CopyFrom after adding website and Section

The question is admin (backend only), not Twig : Where to Manage "copy from" site when adding new website and add section to this website. The "Copyfrom" takes place in the background after ...
eugbro's user avatar
  • 21
2 votes
1 answer
791 views

Craft 3 multi-lingual multi-sites setup with shared assets

I have 2 almost identical websites. Both have almost the same layout but different colors (so different CSS file). They share most of the same templates and assets (images, css, js, videos, etc.). ...
Tom De Smet's user avatar
  • 1,456
1 vote
1 answer
44 views

Not all assets copied over when copying an entry from admin panel

I have a site with multiple locales. I have some entries that will have some basic fields such as title, description, etc and also an asset field. The asset field is translatable so I could have an ...
Chris's user avatar
  • 167
1 vote
0 answers
107 views

How to localize password emails and password change form?

Just wrapping up my first multi-language Craft 2.x site, and the last localization issue we're having is the password reset process. I can't find a way to localize: The email which is triggered by ...
Derek Hogue's user avatar
1 vote
1 answer
33 views

Can user group permissions be used to override entry section locale settings?

I have created a localized site with 9 locales for a client in craft v2.6. They are now requesting us to create a user group for each locale so they can assign editors for each of those regions. When ...
Adam Williams's user avatar
2 votes
0 answers
45 views

Carry over asset field content to other locales

I have a site with English and French locales. One of the fields we have assigned to our entries is an asset field. Currently when an admin adds a new entry, all the English content will carry over ...
Chris's user avatar
  • 167
1 vote
1 answer
483 views

Best practise to use translate in admin panel

I am using a lot of translation with the |t / |translate filter. But the client wants to be able to edit those translations in the admin panel. So, I thought about different ways to achieve that. ...
Jan's user avatar
  • 196
4 votes
1 answer
1k views

Craft 3 Multi-site with no "default" site

I have setup a Craft 3 multi-site with the following configuration: But what I really want is: Additionally, I want to have a 'default' http://localhost:8888 so I can always redirect to /en or /es ...
Rosana Ruiz's user avatar
4 votes
5 answers
7k views

Craft 3 language switcher

Does anybody successfully implemented a language switch run Craft 3? Trying the Craft 2 variant slightly adjusted but still running into issues: Invalid site handle: nl <ul> {% set otherLocales ...
Robbie Post's user avatar
1 vote
0 answers
602 views

Craft 3 Multisite: Template not found

I'm trying to set up a multisite with Craft 3, and the client wants a set up with URLs that look like foo.client.com, with foo.client.com/2018 and foo.client.com/2019. Right now, my index.php file ...
Jon's user avatar
  • 345
1 vote
1 answer
379 views

How to make URLs translatable in Craft 3

I am trying to make the URLs translatable according to the language selected for the site.
Kantesh Hotchandani's user avatar
1 vote
1 answer
2k views

Craft 3 with Multi-Site: how to not set a primary site, or add a first segment to all primary site URLs?

I have a main domain, www.mycompany.com, which has several groups of sites, which are available in several languages: www.mycompany.com/international www.mycompany.com/sales/en www.mycompany.com/...
Romain P.'s user avatar
  • 1,852
1 vote
1 answer
165 views

Tag Localization: how to create a tag without translation fallback version?

I'm dealing with tag localization on an English/Spanish site and have figured out that if I create a new tag, both En and Es elements are created by default, which would be O.K. if I never had to ...
borducks's user avatar
1 vote
2 answers
351 views

phpdotenv with multi-lang Craft setup on MAMP

I inherited a Craft site which uses phpdotenv (which I'm unfamiliar with) and which I now have to make multi-lingual (https://craftcms.com/docs/localization-guide) with an added es and fr locale on ...
erwinheiser's user avatar
1 vote
2 answers
60 views

Having trouble with Bilingual URLs

I'm in the midst of setting up a bilingual website. English and Welsh. I have set up the locales in my settings (en and cy_gb) My directories have the necessary folders for each language, with each ...
Adam's user avatar
  • 255
5 votes
2 answers
9k views

Craft 3: how can I set dynamic Base URL in sites setting?

Sites localized versions are setup using Base URL like this: — http://{baseUrl}/en/ — http://{baseUrl}/fr/ But {baseUrl} variables are not transformed using craft.app.sites.getAllSites(). {% set ...
Romain P.'s user avatar
  • 1,852
2 votes
1 answer
471 views

Craft 3: how can I auto-redirect to a site version using the user IP?

I have set up multi-sites using several locales: — International Website — English — Local Website — French — Dutch — etc. If the user has a French or Dutch IP, it should be auto-...
Romain P.'s user avatar
  • 1,852
2 votes
1 answer
683 views

Craft 3: how can I set an ordered list of all sites, and set a display name different from the site name?

The Craft 3 multi-sites is very useful. However, I found the list dropdown while editing an entry confusing and awkward in my case. I have several sites group, each containing a localized version of ...
Romain P.'s user avatar
  • 1,852
2 votes
1 answer
72 views

Can you remove the `translatable` option to a matrix field without losing locale content?

One of our admins have mistakenly added the translatable option to an important matrix field. We were using this option to synchronise content blocks across multiple languages. This is the our main ...
Kristian S. Munkvold's user avatar
1 vote
1 answer
68 views

Prevent automatic title on resave

I have a situation where I wish to automatically set entry title based on locale entry was created in. This is what I use for title: {{ object.locale == "jp" ? "Japanese title" : "English title"}} ...
Mato's user avatar
  • 229
0 votes
1 answer
344 views

How to create multisite in Craft CMS v3?

I am looking to create multisite in Craft 3. Is there any way to create multisite in Craft?
Kantesh Hotchandani's user avatar
1 vote
1 answer
187 views

Is it possible to change one segment of the current url and keep the rest of it the same in a cleaner way?

How would you go about changing one segment of the current url? I have a select in the footer that you can click on a country name and then it redirects you to the homepage of that country version of ...
hcone5006's user avatar
1 vote
1 answer
282 views

Localization - linking to other pages goes to 404

I have a localized site set up where the language switcher and translations are working fine. However when I link to internal pages it goes to a 404. general.php has this: //local only 'etf-craft....
CreateSean's user avatar
  • 1,983
3 votes
1 answer
919 views

Force language segment in URL on multi-lingual site

I'm setting up a multi-lingual site and want to force the language segments: domain.com/en/ domain.com/fr/ However if you go in the URL bar and remove the en/ or fr/ it loads up the English page ...
CreateSean's user avatar
  • 1,983
0 votes
0 answers
160 views

Updating `{{ forms.dateField }}` value from GET variable

I want to use the built-in Craft field macros to show a date field in a plugin template for filtering. I can retrieve the submitted value on any submission (via GET) but how do I then prepopulate ...
Cole Henley's user avatar
  • 1,741
1 vote
0 answers
287 views

Set Shipping Address country dynamically depending on locale for multi-country website

I have a multi-country website that I am building with Craft Pro Commerce. I have set up locales for 5 countries. So, for the New Shipping Address section, I would like to have the country options ...
hcone5006's user avatar
1 vote
0 answers
179 views

If an entry doesn't exist in a locale and returns a 404, how can I check if the entry exists in a different locale?

I'm trying to create a mechanism for informing users that a particular entry is not available in the selected language, and providing a link to read the article in an alternative language. Therefore, ...
Alex H's user avatar
  • 955

1 2
3
4 5
9