The Simple I18n module implements a trivial patter matching markup to enclose your localizable strings. Anything that is sent to the user using a theme page template (and is not published in the /admin section) gets parsed by this module, so when the markup is found it is automatically filtered and outputted in the current language.
Uses
For localizing menu links, terms, views, field labels, a.o. Use the simple markup:
[[@ Primary language string; Other language; Third one; ... ]]
Translated string should be listed in the same order as site languages are in Regional and language configuration page.
Why was it created?
The main difference form the existing I18n suite (that I tried to use and didn't work out as expected for menus, taxonomy and views):
- this module is trivial to setup and covers all the needs left over by the content translation module for small sites.
- it uses a simple to understand (and easy to type) syntax, that should be safe for usage in output ( a "[[@ ... ; ... ; ... ]]" construction is, at least, extremely rare IMHO for JS, CSS, HTML, XML or human/machine-readable content. I consider allowing configuration of the pattern, if required by the comunity.
Compatibility
It's for Drupal 7.x (but can easily be ported to 6.x).
git clone http://git.drupal.org/sandbox/z7/1347340.git simple_i18n
Plans for future
I plan to enable this one on several production sites this week.
I also have in plan to write a simple module that would make use of HTML5 upload fields in file/image field type widgets (for browser supporting it). It would hook in the field API and add the required number of fields, depending on what was submitted by the user.
I had some other code contributions, stated in comments, but I felt there was no need to release them as modules.
Comments
Comment #1
chakrapani commentedReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Comment #2
z7 commentedFixed.
Comment #2.0
z7 commentedTypo
Comment #3
raynimmo commentedAutomated review
Please keep in mind that this is primarily a high level check that does not replace but eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.
Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards):
These are fairly minor documentation formatting points really other than the camel-case errors.
Make sure to set your status back to 'needs review' once you have addressed the issues highlighted above.
Good luck with the rest of your review.
Comment #4
z7 commentedRaynimmo, thanks for your time.
I fixed the things that Drupal Code Sniffer found. What would be next for me to do to pass the application to the Community review phase?
Comment #5
z7 commentedComment #6
patrickd commentedReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #7
z7 commentedSorry, it didn't push the modification last time. Now it's ok.
Comment #8
z7 commentedAnyone willing to give a review?
Comment #9
z7 commentedThe project was presented during the first OpenSource.md boot-camp and a team of 6 contributors was formed to evolve it into a fully featured I18n project.
The basic direction is to keep the token system as storage solution, but improve UI by using jQuery.
Until the stable (2.0) release, the following things are planned:
Comment #10
misc commentedHi,
You still have some small coding standards issues:
Comment #11
klausiPlease do not switch issues to "needs work" without giving a manual review.
Get a review bonus and we will come back to your application sooner.
Comment #12
misc commentedI installed the module, but I do not really know how to test it after that. Maybe it is just me... Could you add some more information about how to use it?
Comment #13
misc commentedComment #14
z7 commentedOK. I'll make a guide or something to give a clear view on some use-cases (with screenshots).
Comment #15
misc commentedHow did it go? Did you get the time to do a guide?
Comment #15.0
misc commentedLanguage improvement
Comment #16
chi commentedI couldn't clone project:
warning: remote HEAD refers to nonexistent ref, unable to checkout.Please, check your HEAD refers.
Comment #17
mitchell commentedThis is an interesting addition to the i18n ecosystem. I'd like to see it in action!
To ease review, #14 would be a big help or posting some type of configuration export would be great too.
I'll set it as waiting to hear back from you.
Comment #18
mitchell commentedI'll set it as waiting to hear back from you... because the code reviews don't show anything major.
Thanks!
Comment #19
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #19.0
klausiFix broken git link