Jump to content

Search the Community

Showing results for tags 'multilanguage'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. Alfraganus

    yii2 basic internalization

    Dear programmers, I need to make website with 2 languages in Yii2 basic framework, however, I researched tons of times on google and other search engines and I could only find yii2 advanced internalisation. I need for basic mode, please if you have source codes for yii2 basic multiple languages or if you know any link or video tutorial about yii2 basic internalisation, please kindly share with me, I would be greatly appriciated. I am looking forward from hearing from you soon.
  2. Lykos22

    Improve my multilanguage code

    Hi, I have created a website in which I have added the ability the user to choose a language. The structure of my site looks like in the image. Inside core folder, there's the initialize.php file where I have put this: $allowed_languages = array('fre', 'eng');if(isset($_GET['lang']) === true && in_array($_GET['lang'], $allowed_languages) === true){$_SESSION['lang'] = $_GET['lang'];}elseif(isset($_SESSION['lang']) === false){//set default language if not selected$_SESSION['lang'] = 'eng';}include_once("includes/langs/".$_SESSION['lang'].".php"); and inside the langs folder there are both eng.php and fre.php so the code inside them looks like this: //eng.php$lang = array();// Menu - Nav$lang['HOME'] = 'Home';$lang['ABOUT'] = 'About';$lang['CONTACT'] = 'Contact';// Index page$lang['WELCOME'] = 'Welcome to my website!';//About page$lang['ABOUT_PAGE'] = 'This is the about page.'; So in navigation I do: <a href="index.php"><?php echo $lang['HOME']; ?></a>,in index.php for example I do: <h2><?php echo $lang['WELCOME']; ?></h2>, etc etc. My question is if there's a page, for example the about.php, in which I have a lot of content like headings, paragraphs, lists etc etc which is the best way to output it on the page??Do I have to do it all like this $lang['PARAGRAPH_1'] = 'This is the first paragraph.';$lang['PARAGRAPH_2'] = 'This is another paragraph.';$lang['LISTITEM_1'] = 'This is the first list item.';.....<h2><?php echo $lang['ABOUT_PAGE'] ; ?></h2><p><?php echo $lang['PARAGRAPH_1'] ; ?></p><p><?php echo $lang['PARAGRAPH_2'] ; ?></p> or in pages like this there's a "better" way to approach this???
×