Jump to content

None English Language as Default Language


lisandi
 Share

Recommended Posts

By Processwire default the Installation is always in English.

As Ryan said earlier:
 

In fact, ProcessWire doesn't (or isn't supposed to) let you change the name of the default language at all.

To install a new language pack withNicos Module is easy buthow to get it running as Default. And where actually do you get the default ENGLISH files as if you exchange the default files English will be gine. It is even one when you change the name and title to something else than default.

IMHO there need to be a way to switch to a default language with / much easier.

All the tutorials - which are great - unfortunately keep the default Lingua Franca = English.

i.e. can somebody perhaps point to a tutorial how to setup German, or any other language than English as Default Language and how to get as second Language English running without having to disable the default Language field or moving files from German to be default?

This is absolutly not developer Friendly as it costs a lot of time and bears the danger that things get lost or modified at the wrong place.

IMHO Nicos approach with uploading the translations in a one tep process is a good way but as said the English translation is missing! Also it does not seem to be possible to upload a language file again i.e. for updating as translations usually change with every version.

It would be great if this Tutorial here http://processwire.com/api/multi-language-support/ would point out into the right direction if you are not inteded to use English as default language but still need English as another Language. Thanks

Link to comment
Share on other sites

Go to the guest user and change language to what you wish i.e. Deutsch.


Having english as a second language is also easy, you don't need language translation files for english as it's already english, so just keep (core) it empty.

  • Like 3
Link to comment
Share on other sites

so just keep (core) it empty.

What exactly do you want to say?

1. I set the guest to be German and than the URL will show / instead of /de/

2. What happens to the de-de language files? It is quite confusing to have in the backend a default language which is German but 0 translatable files show in that column when clicking on default and additional you have de-DE in the second Tab with all German translatable files. but the second tab should be English and not German again.

3. Also I personally like to keep my processwire in English language in the backend even in the Frontend German should be the default

Could you please explain the steps a bit clearer Thanks!

Link to comment
Share on other sites

Creating a new "english" language and it is english already. No need for translation as core is already english.

1. You can set the url segment if you wish to be whatever on the home (root) page name if LanguagePageNames is installed. Usually it's a good approach to have the default language have no segment. But that's up to you.

2. I don't understand what you're saying really. Default german -> has language files, secondary english -> doesn't need language files.

3. You can have both. But again I don't understand what you're saying or what the problem is you have there.

  • Like 1
Link to comment
Share on other sites

Hi Florian

Yes I know that that the english Language is already present in the core.

I tried setting the frontend language with the guest language as you suggested. hmm. I can do this only once for all sites as there is only one guest account.
If I have now a multidomain site where some sites need to have german as default, others french and again others english as default this won't work. Ok I would need to use the multidatabase approach but than I could not share content so easily like with the one database approach.

Isn't there a way to overwrite the default settings so that you actually could define in your _init.php what should be the default language.

The main problem with all those languages is to create a good fallback solution and usually they fallback to default. If that is empty hmm than it is an empty fallback.

Better woudl be able to define the default language per page recursively. Also to define the order of language tabs so that the first tab always represents the main fallback language.

----
1. Yes I can set that element.
Take as example the minimal site profile which is multilingual. English, German, Finnish
When you click home the URL is http://domain.tld/ like it should be but when you click on About already the /en/ element gets inserted
I take out the /en/ from Settings and the URLs look correct without language specified.
German and fiinish at the language segment already on the home page like it shoudl be if they are not a default language.

2. now I want to change that the default language is actually German - shown without segment and that the English Language is showing /en/ instead.

2.1. I change the guest user to be German and than do

Version 1: I insert again the /en/ element in settings and I delete the /de/ element
http://domain.tld/en/about/ shows English
but when I now change the language to Geman it stays English - everything gets directed to http://domain.tld/en/about/

it is simply not possible to leave the German language path empty as after save the one from default language gets inserted here bu default which is /en/

Version 2: I move the German content to the default Language and the English Content to the actually German Tab in the backend but call it /en/ in the path segment and leave the Default without an element. This works but now I have the problem in the backend as it shows here the wrong namings and still the translatable files are at the wrong place, which means default still shows o translatable files while the former German but now renamed English and /en/ pathsegment Tb shows all files translated into German. -> It is cosmetic but it is unnecessarily confusing.

We have three Langauge tabs in Backend Languages - in that profile original it is English - German - Finnish ( 1-2-3 )

(numbers show the Tab position)
A Default is titled now 1-Deutsch 2-German 3-Saksan (before 1-English)
B German is titled now 1-Englissh 2-English 3-Englanti (before 1-German)

When I now go to user Settings I need to choose English to get a German backend and I have to choose German to get my backend in English.
I assume that also all terms of the frontend have NOT changed i.e. if you have a translation to German - Anmeldung and English - Registration.

Only if I now would switch those German Translatin Files to be the default translation than the frontend would work also with German terms from translation files. But when I switch than I will losse the English translation like written already and it was suggested to insert than again the English translation but there isn't one available separately.

---

What would be the better - the logical way:

You define the default language in a page and than it works recursevly down the branch until you change it again perhaps inside a branch.
Probably it would even be possible to define and sort the languages in that top page and than theTabs show up in that order.

Now you would be able to define even several different languages as default in a multidomain site (one Database).

The frontend would get called in the defined language in the root-page of a branch/site while the backend would be called by the user defined language.

---

It is not logical to click actually on Deutsch to get your English translation in the backend and to click on English to get your Backend translated to German.
Like I said it might be only cosmetic and if you know it you could do but I think it is not at all only cosmetic as also terms from the frontend could be translated and than a German website woudl show English (default) Terms to - which is not good.

Thanks for your input and ideas!



 

  • Like 1
Link to comment
Share on other sites

hi lisandi,

little bit confusing (your description)...

Example: you have 3 languages english, german, finnish

1. name=default, title=English, english has or needs no files because strings are in core. Remember: PW always needs a default language.

2. name=german, title=German, has 1** files with translations

3. name=finnish, title=Finnish, has 1** files with translations

now you can rename the name and titles. Maybe you will get a error message, but then hard reload the page (so it was earlier).

1. name=english, title=English, english has or needs no files because strings are in core.

2. name=default, title=German, has 1** files with translations

3. name=finnish, title=Finnish, has 1** files with translations

other possibility: load the german files into the default language, rename title to German.

Then create new language: name=english, title=English (no files needed).

and so on...

Because users: guest is always the frontend for not-logged-in users. After logging in, the registered user will see the backend in the language, which you can set in the user profiles. If you don't change the language in the guest user profile, it always uses the default language.

EDIT: first solution not possible anymore

Edited by Manfred62
Link to comment
Share on other sites

Hi Manfred thanks for your reply

I tried to rename the name "default" into english but this is not editable. You can only change the title!

When I try to rename it vice versa than I recieve a message :Changed page URL name to "default-1" because requested name was already taken.
in other words default is always default and that specific file and that is English Language!

Your solution

1. name=english, title=English, english has or needs no files because strings are in core.

2. name=default, title=German, has 1** files with translations

3. name=finnish, title=Finnish, has 1** files with translations

would be fine but is simply not working - at least not in 2.5.8
 

other possibility: load the german files into the default language, rename title to German.

Where exactly do you load those files - to which folder(s) - if you have lot of sites this can be quite painful job with a high chance of errors.

--

The solution with the guest user is working in a single page setting or in a homogene mi\ultisite one db setting mut will never work in a multi root language multidomain setting.

i.e.

We have churches and school-communities etc. all around the world which get managed in multidomain sites - currently in TYPO3 as they share content and have also a very easy way of internal communication without email address.

We are planning and thinking about how to get them working in Processwire. as it provides also the multidomain one db feature like TYPO3 and we think we will be more flexible and for sure faster in pageload with Processwire.

As those sites are  in different mother language area  and they have individual sites and domains - some subdomains, the default root language needs to be able to switch. which would mean also the guest user would need to have a way to get multiple languages assigned depending on where he is located inside that multi domain site.

In TYPO3 we solve the problem by assigning and defining the default language in TYPOscript and also define an individual language fallback path. If no content is available in the called frontend language than the next lower in the fallback will be tried until it reaches the default language, which is the one the content gets written in its original language depending on the language spoken in that country. The frontend language is separated from the backend. This definition and fallback of languages can be made with each single domain branch inside a multi domain site by inserting in each root page of that multidomain site a different definition and order of fall back languages via TYPOScript. I guess something similar would also be possible via PHP!

The branch in US will have i.e. English / French / Spanish / German  the default domain home looks like http://our-ngo.org
the German Branch has German / English / French / and some have Arabic  the default domain home looks like http://our-ngo.de
In Thailand we have Thai / English / German / simple Chinese / Burmese (German actually only because i can translate it to German) the default domain home looks like http://thailand.our-ngo.org
etc.
...

The content itself has always the same language ID which makes it possible to share content all over the site.
Always the German Content will be shown also in the German section and the English in the English etc of each Branch



 

Link to comment
Share on other sites

would be fine but is simply not working - at least not in 2.5.8

yes, just tried this and it's not possible. Must be in an very old version where I did it. So better take the second solution.

Where exactly do you load those files - to which folder(s) - if you have lot of sites this can be quite painful job with a high chance of errors.

at the end of language-page you can upload files. Simply drag&drop the zip or files there. It will generate a folder with an id under /site/assets/files/

Link to comment
Share on other sites

  • 5 months later...
  • 10 months later...

hello and thanks for any help!

i have been playing around with processwire for some time but i could not manage to get my language setup the way i need it.

i am a pw noob and i might be missing a central point here - so please help me find my way :)

the default language for my site is german and english is the second option.

we don't care about the backend, just about the site.

my problem is as follows:

1. i installed pw with the site-language profile.

2. deleted finnish and german

3. renamed english to german -> thats when the webserver more or less freezes for some time (10min)

4. created a new language english

that works fine (exept the freeze), but when i create a new page, the default language (german) gets "en" added to the path mydomain.com/en/whateverpage.

i don't get it - it's the default language and it is set to not add the language prefix in the path.

(root url serves default language)

the second language doesn't have the prefix...

maybe there is a better way to do it...

start with a blank profile....

thanks!

ABOUT THE FREEZE:

I found out that it was a snort rule that banned me for 15min, again and again.

According to my admin snort said: http_inspect, unknown method

Link to comment
Share on other sites

  • 8 months later...
On 7-3-2016 at 7:28 PM, LostKobrakai said:

This part of the domain is set in the settings tab of the homepage on the name field(s). 

Thanks! That was something that I was looking for. Wasn't clear for me, also because you already set the language code as the name for the language.

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

×
×
  • Create New...