pagekit
pagekit copied to clipboard
Feature Request: Multilingual
Making pagekit natively multilingual would be great.
Eventually, setting up a dedicated language manager extension would be interesting so it would give us the possibility to manage translatable content.
Also if do not need it, we could remove the extension and fallback to a monolingual site.
Yes, multilingual ist a important feature in these days, also for smaller sites.
Meanwhile, it is possible to create a language file for themes ? I tried " ./pagekit theme:translate mytheme " but : [InvalidArgumentException] Command "theme:translate" is not defined.
I agree making pagekit natively multilingual is essential. It would be an extra reason to replace Wordpress by Pagekit.
+1
I'll take a look at the code and see if it is easily implemented. I'd like this feature, too.
Would be really neat thing to be integrated. Without this, CMS'es are more like "US ONLY" thing for me.
So I +1 for this :)
A CMS without multilanguage support is not a CMS.
I'm taking a look at what would be required to make this happen. Is anybody else working on this? I'm not familiar with Symfony, but I use Laravel so it's shouldn't be too bad. Should we open up a new branch for this?
To make this happen, several things need to happen:
Visitor side:
- The locale (buttons, controls, etc) should switch for the visitor based on the language settings.
- The content should be loaded into the correct language, based on the browser settings.
CMS side:
- Creating versions of the post/articles/pages in another language should be possible.
- There should be a fallback language.
User friendly language negotiation:
- check client language and serve content automatically in that language if available
- if client language can't be detected or is not available, serve fallback language (configurable)
- let user always select another language (overrides automatic detection) and permanently store it in DB for registered users, in cookie for guests, nothing is more annoying than a site that forgets what language I chose.
Markus,
I agree, the only correction is that the client language/locale list is an array:
- check client language(s) and serve content automatically in that language if available
Now, let me figure out what type of effort it would be. Do you have any tips? I'm new with Symfony, but not with PHP so I'll just start hacking into my fork.
Storing of translations:
- choose adapter wisely, you might need/want to provide online translation tools for crowd sourced CMS translations, handle plurals, etc.
- break project down in to translation domains that are handled independently from each other (even if that means duplicate translations) e. g. cms-public-end, cms-admin-end
- provide translations interface for plugin developers so they can hook into the infrastructure
Chris, I'm using Symfony very rarely but I'm sure the translation infrastructure isn't very different from other frameworks. Personally I prefer using the gettext adapter.
Introducing i18n / translatability into a whole CMS is not a small task. Subtasks IMO are:
- language negotiation (pretty easy, probably just something like a controller plugin)
- language switcher (GUI, pretty easy, one typical mistake is to translate the selectable languages with the rest of the page which is BS, any language in a language switcher should always stay in that language, English, Deutsch, Italiano, etc. otherwise I might need to look for my language in a language I don't understand at all.)
- translation adapter (hard choise and lots of work because you basically have to touch every single language string in the whole software, this will give you a good idea about the quality of your DI infrastructure and code readability, it will also force you to use
sprintfin case you find stuff like$text . ' - and - ' . $anotherTextin your code. - translatability of text stored in DB these are CMS content texts and I guess also a lot of other texts used in the GUI. Here it's important to create an infrastructure that centralizes all translations into one table so lookups can be optimized.
That's all I can think of at the moment. Just a brainstorm because I like the idea of pagekit and I have some experience with translating large infrastructures.
Markus,
I agree that it is not a small task. I want to tackle one subtask, if possible. I just need to find out where to start.
The translation adapter is already in the code from what I can see, although I've created a issue regarding date formatting fallback.
I can't understand this feature request...
On pagekit already exist localization and content are translatable using what mark said "gettext", using .po files which exist many po editor like poedit or online https://localise.biz/free/poedit
the function name is _() and there is @trans() function for view files.
Which part of pagekit should be translatable?
Content of pages and blogs?
Not sure if this is required by cms core, also WordPress does not support a bilingual or multilingual blog out-of-the-box. There are however Plugins developed by the WordPress community which will allow you to create a multilingual blog easily.
This can be the same for pagekit.
Maybe there is something other that is not translatable which I missing?
Yes, I want translated content and I think it is a mayor shortcoming of Wordpress that it is not native multi-lingual. I don't use it any longer for multi-language sites. The plugins are either not user-friendly or they make the pages load slow. If Pagekit gets multi-lingual and gets post ordering in the blog I intend to stop using Wordpress.
It should also do browser locale detection and serve up the proper language of the content. To do this, we would need to add a locale code field for the posts.
In our experience, yes it is good to detect users language, but for example in my country 60% users use browser in english, but language is lithuanian. so we separate language by slug.
ALso in-core multi-language would be good because of search modules or something like this. We currently are using PyroCMS with custom multi-lang support.
For us multi-language is not only the translated cms buttons or something. We need to wrtie news for example in differnet languages, pages are in different languge, then search involves searches only in specific language etc...
Thanks Jaroslav
@tastymousehub I understand now.
I found this topic on roadmap here: http://www.pagekit.com/roadmap
They seem integrate this feature but only in Future, after releasing 1.0.0 in first quartar of 2015.
For now maybe someone will prepare an extension for this.
I agree with mark who suggest how to handle this:
- check client language and serve content automatically in that language if available
- if client language can't be detected or is not available, serve fallback language (configurable)
- let user always select another language (overrides automatic detection) and permanently store it in DB for registered users, in cookie for guests
Guys, you really need to prioritize multi-language functionality. Like nearly all other platforms, you've left it as an afterthought, and it's gonna get messy. While I'm here, I also want to share that your URL structure needs to steer clear of filler words like "page," "post," "category," etc. These are really a nuisance for SEOs and site owners who want to migrate to a new platform but retain the organic ranking they've worked so hard and spent so much money to achieve. I wouldn't even look at yet another CMS that doesn't support custom URLs and multi-language functionality.
:+1:
:+1:
:+1:
@88kbbq you are right! :+1
We released the Pagekit Beta today. I close this issue because the code base completely changed. Please open a new issue if it still exists.
Great news Sascha, I'll check it out.
Cheers!
Kevin
On Thu, Sep 10, 2015 at 11:47 PM, Sascha [email protected] wrote:
We released the Pagekit Beta http://www.pagekit.com/blog/2015/09/10/pagekit-beta-released today. I close this issue because the code base completely changed. Please open a new issue if it still exists.
— Reply to this email directly or view it on GitHub https://github.com/pagekit/pagekit/issues/173#issuecomment-139287342.
But does the new pagekit support multilingual sites?
No, sorry, this is on the roadmap.
Disappointed.
Sent from my iPhone
On 2015年9月11日, at 19:42, Sascha [email protected] wrote:
Sorry, this is on the roadmap.
— Reply to this email directly or view it on GitHub.
+1 must-have IMHO