Welcome Guest, Not a member yet? Register   Sign In
Internationalization & Localization ?
#1

hi

i searched around for how would internationalization & localization work in CI 4 and didn't find any plans / info etc

please implement something better or similar to http://book.cakephp.org/3.0/en/core-libr...ation.html

would be nice to have different storage drivers to file or to db

would be nice something like http://www.yiiframework.com/doc-2.0/guid...ge-command

any info on this subject ?
Reply
#2

This *is* mentioned in the roadmap as part of phase 2, which we are embarking on now Smile
We haven't completed design or created issues for all the components planned for part 2, but i18n will be there!
Reply
#3

My current thinking is building PHP's native intl into the framework where it makes sense. For example, the language strings that we've always used will see a huge functional change just by using the intl string libraries internally. But, nothing has been talked about much as far as other implementation details go. My thoughts have always been that we need to find ways to truly help make it multi-lingual, and localizable.
Reply
#4

What do you think about the support .mo .po files. In older versions of CI always is through an array.

It will be good to have multiple translation source formats possible, even if CI has 2-3 by default.
Reply
#5

(07-05-2016, 12:57 AM)davidgv88 Wrote: What do you think about the support .mo .po files. In older versions of CI always is through an array.

It will be good to have multiple translation source formats possible, even if CI has 2-3 by default.

While I think that's a good goal, I don't think it's something to shoot for with the 4.0 release. There are a couple of differences between folder structures that are required, it adds to the complexity of the system, and is, quite frankly, another task I'd have to tackle and make sure worked seamlessly before a launch. However, it should be pretty simple for people to create other translation systems if the desire, by creating a new class that implements the interface and specifying it in the Services file. So, you could easily extend/replace the system with one that uses gettext for your own stuff - and even share with the community. Who knows what could happen after that. Smile
Reply
#6

(This post was last modified: 07-06-2016, 12:42 AM by Muzikant.)

As kilishan wrote: "it adds to the complexity of the system". Gettext is not beginners friendly also. It is much easier to change strings in PHP files, than to change them in PO files.

On the other side, if you are familiar with gettext and if you have appropriate editor, than it is very easy to make a translation even for non programmers. But this is more advanced level and I prefer simplicity instead of complexity. :-)
Reply
#7

I strongly support the ability for use of .po files within CodeIgniter 4. I believe it's an important gap between an SME Business website and that of a larger enterprise.

I would arguably say that maintenance for a .po file (Via an editor of course) is much, much easier than having to share a .php file for various translators and organisations to adjust.
Reply
#8

I was just reading about Gettext on php.net and the linked docs they have from there. (Primarily following this post http://forum.codeigniter.com/thread-6623...#pid336954). I thought it looked really good, although the PHP docs are a bit lacking at the moment. Someone posted a link here from that CI post so I thought I would add my 2 pennies.

Although I rarely do multilingual sites, when I have done in the past it was a real pain. I think this is a great step forward, I really liked what I read. As for beginners finding it difficult, I know what you mean, but if it was integrated and part of a default example, I think even beginners would get the hang of it really quickly. I am not a beginner per se, but this is new to me, and I am self taught so there are probably big blanks in my knowledge, and although I have not used it yet, I thought it looked fairly straight forward. So although I have no great preference, and no real experience, just thought I would say that I think it would be a good thing to use this too.
Reply
#9

I use CodeIgniter since v1.7 and I cannot see myself developing any sort of web application without it ! The current language system is good, but once I found out about php-gettext, I wanted to integrate it. I searched on github and here and I found lots of libraries! Until I made ma own as @MackieeE shared (http://forum.codeigniter.com/thread-6623...#pid336942), this is my final work trying to integrate it.

It uses by default php_gettext extension, but if it is not installed or not enabled it will use Launchpad php-gettext library. You can give it a try a let me know.

Besides, +1 for CI4 i18n & i10n. keep up the good work
Follow me on Github, you may find interesting things!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB