Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Laravel 4.x Localization

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 34
    Comment on it

    In laravel 4.x we have lang class which will help us to retrieving string in different languages that will help us to easily support multiple languages.

    The folder structure for lang files are

    /app
        /lang
            /en
                messages.php
            /es
                messages.php
    


    Example:

    Language files always give an array of keyed strings.

    <?php
    
    return array(
        'welcome' => 'Welcome to our application'
    );
    

    Note: we can also change our default language by changing in the app/config/app.php configuration file.

    App::setLocale('es');
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: