I'm using Codeigniter 2 and i want to know how to hide hide lang id for default language : www.domain.com/page.html and for other languages i can make it as normal like www.domain.com/es/page.html , www.domain.com/fr/page.html,?
hi use this lang library can solve this problem
multi lang library
Related
I created a project in Laravel 5.8. I just started working on adding multiple languages in my website. How do I make it so if I click on the language button to choose french the website will load every page as /fr/<rest of the url
Like this
when selecting english language
when selecting bangla language
When the button is clicked you should set the desired locale, this can be done using App::setLocale($locale)
The documentation of Laravel explains how you could do this, for your exact use case:
Laravel Configuring The Locale
I'm trying to make a website using Larave+Vue. So I want to use two languages in there, but I don't know how to use Localization in the Laravel+Vue mix application.
You need default Laravel localization + Vue Localization
I need to change the default backend/admin language of an Joomla site programmaticly.
I know how to change in Backend, but in this case it is nessesary to change it in the code.
Do anyone know a solution or has an code snipet on how to change the default admin language?
This question already has an answer here:
Laravel 5 multi language site with language prefix in the url
(1 answer)
Closed 3 years ago.
i want to create a landing page with laravel. This web has multiple language. And english as default language. and im using laravel 5.8 version.
for example if we access to About Page
hxxps://myweb.site/about -> default lang
and
hxxps://myweb.site/fr/about -> use french lang
hxxps://myweb.site/en/about -> use english lang
anyone can help me? thanks
You can achieve multiple language landing page using Laravel's localization. You can create string for every language you can use. Those strings are located in resources/lang directory. Let's say, for example, you want to use french language. Inside this directory, create a new directory called fr, and inside that directory, create messages.php file, that would look like this:
<?php
return [
'hello' => 'Bonjour'
];
Now you need to configure or determine what language should be used. The default language for your application is stored in the config/app.php configuration file. You may modify this value to suit the needs of your application. You may also change the active language at runtime using the setLocale method on the App facade:
Route::get('welcome/{locale}', function ($locale) {
App::setLocale($locale);
//
});
When you configure your config, you can then retrieve the string you previously defined by using the #lang directive in your blade view, like this:
#lang('messages.welcome')
This was the simplest example of using language files. Hope it can lead you in right direction. Read more about it in Laravel's official documentation.
i'm developping a website with 4 Languages(arabic , fransh,english,espagnol),using CodeIgniter , i'm begging with, by creating the template , but i dont know how to handle the template with the navigation list & the language , to detect the right language,all the examples of multilangue are basics.;any help will be appreciated , tutos , steps ,ideas ..
You can do it with CodeIgniter's Language Library.
For more read the answer here. This can help you!
UPDATE: Also Check this library
If you want to use template, when you can do it CodeIgniter Template