Torsten Baldes Posted October 6, 2015 Share Posted October 6, 2015 hi, is there a way to build a multilanguage site but disable one of the languages globally and not page by page? thanks! Link to comment Share on other sites More sharing options...
diogo Posted October 6, 2015 Share Posted October 6, 2015 You can make the language "hidden" in that language page settings Link to comment Share on other sites More sharing options...
Torsten Baldes Posted October 6, 2015 Author Share Posted October 6, 2015 Thanks diogo, that works partly. the pages are now not available anymore in the hidden language, which is good. but now there is no way to fill in the contents for the hidden language, which is bad. ;-) i want to disable the language for all frontend users but i also want to be able to fill in the contents for this language, and when i'm finished, i just want to flip a (one) switch to make the pages in this language public available. Link to comment Share on other sites More sharing options...
Torsten Baldes Posted October 6, 2015 Author Share Posted October 6, 2015 i think i found a possible solution: i could modify (only activate the desired language) this recipe, to activate the language: https://processwire-recipes.com/recipes/activate-all-languages/ if someone knows a better/faster/easier solution, i'm all ears. Link to comment Share on other sites More sharing options...
diogo Posted October 6, 2015 Share Posted October 6, 2015 true, sorry about that... Have you tried removing the url segment for the languages on the home settings? Like this they will all have "/" as base, and the default should prevail in any subpage also. Link to comment Share on other sites More sharing options...
Torsten Baldes Posted October 6, 2015 Author Share Posted October 6, 2015 this would work on the homepage, but not on the childpages. if the language on these childpages is active, they are still available with their slug in this language. Link to comment Share on other sites More sharing options...
LostKobrakai Posted October 6, 2015 Share Posted October 6, 2015 Use a prependTemplate file, where you check for the language and if it's the "not public" one just throw an 404 or redirect. Can even be adapted so translators can visit the site. 3 Link to comment Share on other sites More sharing options...
diogo Posted October 6, 2015 Share Posted October 6, 2015 Use a prependTemplate file, where you check for the language and if it's the "not public" one just throw an 404 or redirect. Can even be adapted so translators can visit the site. The language switcher would also have to be adapted to reflect this. --- You could add a new checkbox field to the languages template that would make a language inactive. Then you just would have to make your language switcher reflect that with a selector and use LostKobrakai's suggestion limited to those languages with the checkbox selected. Link to comment Share on other sites More sharing options...
Torsten Baldes Posted October 6, 2015 Author Share Posted October 6, 2015 @LostKobrakai thanks! i think this would work. the only edgecase could be other plugins which auto generate a list of links (e.g. sitemap.xml) Link to comment Share on other sites More sharing options...
cream Posted October 26, 2015 Share Posted October 26, 2015 Just posting a link to relative thread (with no working solution yet, as I'm too deep in other projects right now to test more): https://processwire.com/talk/topic/10467-allow-translators-to-work-on-hidden-language/ If anyone comes up with a no-hassle solution to this, I'd be eager to read about it! Might help many others too. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now