Jump to content

swap default language


fruid
 Share

Recommended Posts

the thing is, the entire project is basically finished and all strings translated to german, except that the default language should be german and english secondary. I didn't think that would be a problem later on and should be considered from the very start. Now it so far seems like a big hassle, most solutions suggested here assume that not much progress has been done on the project anyway or the required default language not even created. 

(Another solution: I'd be fine with switching the strings manually, however, the url then still stay /de/ for english and /en/ for german, don't know how to change that.)

Link to comment
Share on other sites

Hey, @fruid!

You can try this algorithm of actions:

  1. Export all the strings from German language.
  2. Import the exported German strings to default language, making it German.
  3. Remove all translations from the secondary language, making it untranslated => English.
  4. Maybe rename things here and there for the convenience. Change the name of the secondary page to en.
  • Like 2
Link to comment
Share on other sites

getting closer to the issue I think…

I renamed the default language to deutsch/german, deleted all the json files in there. 
But I can't upload the german .json files nor the complete .zip file to this language.

I'm getting errors:
Refused file wire …… .json because it is already on the file system and owned by a different field. 

I even deleted the other secondary language, first only the json strings in there, now the entire language package. Still can't upload.

Thanks for help!

Link to comment
Share on other sites

2 hours ago, fruid said:

Refused file wire …… .json because it is already on the file system and owned by a different field.

Check the site/assets/files/{ID-OF-YOUR-LANGUAGES}/ directories and delete all zip or json files belonging to the languages. Looks like there's some junk left over from all your trying. ?  Or you messed a bit with the core and site translation files (?)

Edit: you may go under fields -> filter; allow system fields; YES, then you see the fields language_files and language_files_site. If you click to edit them, you can on tab input and tip the checkbox near Overwrite existing files (at least while experimenting).

  • Like 1
Link to comment
Share on other sites

@horst

Followed all your advice, deleted the .zip and .json files in those /assets/files/ folders, checked the "overwrite existing files" as suggested for the mentioned fields. 

Now I at least can upload the german language package to the default language entry. I deleted all the files within the secondary language (now called english).

However, the frontend still /de/ in the URL for the english site and nothing for the default language german (which is fine). How to change that? 

The page contents and custom fields are mixed up as well (I might just swap that manually since it's not that big of a site).

Thanks so far!

EDIT: now I deleted the secondary language because I thought re-installing might fix the issue, also since english doesn't require any files to work. But now it doesn't work in the frontend, all links to default language. 

Edited by fruid
Link to comment
Share on other sites

Ah, you are talking of the secondary languages path name. So, as it is the Homepage, what resides in the root, you previously have set it and now have to change it in the homepage under Settings Tab > Name:

image.png.02fcbbd67300464f5ddff87a1a9a7c13.png

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...