• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
localization issue

#11
go to  app config ci4 

in this  exmple  two lang en ,fa 

so use Accept-Language header. = en or fa, ... change back end lng 
PHP Code:
public $defaultLocale 'en';

    
/**
     * --------------------------------------------------------------------------
     * Negotiate Locale
     * --------------------------------------------------------------------------
     *
     * If true, the current Request object will automatically determine the
     * language to use based on the value of the Accept-Language header.
     *
     * If false, no automatic detection will be performed.
     *
     * @var boolean
     */
    
public $negotiateLocale true;

    
/**
     * --------------------------------------------------------------------------
     * Supported Locales
     * --------------------------------------------------------------------------
     *
     * If $negotiateLocale is true, this array lists the locales supported
     * by the application in descending order of priority. If no match is
     * found, the first locale will be used.
     *
     * @var string[]
     */
    
public $supportedLocales = ['en','fa']; 
Reply


Messages In This Thread
localization issue - by eleumas - 04-29-2021, 04:34 AM
RE: localization issue - by demyr - 04-29-2021, 09:02 AM
RE: localization issue - by includebeer - 04-29-2021, 05:16 PM
RE: localization issue - by eleumas - 04-30-2021, 02:45 AM
RE: localization issue - by demyr - 04-30-2021, 06:47 AM
RE: localization issue - by eleumas - 04-30-2021, 07:01 AM
RE: localization issue - by includebeer - 04-30-2021, 07:31 AM
RE: localization issue - by demyr - 04-30-2021, 07:54 AM
RE: localization issue - by eleumas - 05-04-2021, 12:45 AM
RE: localization issue - by InsiteFX - 05-04-2021, 02:13 AM
RE: localization issue - by paliz - 05-04-2021, 11:11 AM
RE: localization issue - by eleumas - Yesterday, 12:06 AM
RE: localization issue - by includebeer - Yesterday, 04:31 AM
RE: localization issue - by eleumas - Yesterday, 01:01 PM
RE: localization issue - by InsiteFX - 8 hours ago

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.