Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthoredward
     
    Hello,

    I'm building an app that should be complete in Dutch. So I do everything in English (table names, actions, etc.) and I translate the views with the use of _{}. One thing I haven't figure out is how to translate the error messages from validating forms. I've tried several things but nothing worked.

    Also, how can I set the language of the site to Dutch so that all the visitors default language can be set to NL.

    I saw this posted in another discussion:

    > worked around this by explicitly setting the session's 'lang' value on top of calling AK::lang():
    > $_SESSION['lang'] = 'fr';

    But how exactly should I do this?
    • CommentAuthorKaste
     

    One thing I haven't figure out is how to translate the error messages from validating forms. I've tried several things but nothing worked.

    This wasnt implemented for the helper methods error_messages_for or error_message_on . So I just did that.

    _{}

    you can translate variables with

    <%= t variable_name %>
    
    • CommentAuthorKaste
     

    maybe

    define('AK_AVAILABLE_LOCALES', 'en,nl');
    define('AK_PUBLIC_LOCALES', 'nl');
    

    is what you're looking for?

    • CommentAuthoredward
     

    Hi Kaste,

    your suggestion in the last comment about locales worked.

    Thanks.