SOLVED Problem using {lang} in template... help!

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
bongobongo
Forum Members
Forum Members
Posts: 33
Joined: Thu Dec 11, 2008 11:41 pm

SOLVED Problem using {lang} in template... help!

Post by bongobongo »

*** UPDATE ***

Okay... I have now used {lang} in my template (urk, dohhh) and now it shows
English and Norsk links.

But how do I make it show the flag icons instead of the textual links?

Dohhh ... again... the flag png files was not in images/lang dir, I guess my problem will be gooner when I
get those flags... PROBLEM SOLVED

*** UPDATE END ***

I have installed cmsms-mle-1.5.1-full

I have made the changes to the tables and enabled config_lang.php

Site works.

I'm using two languages en_US and no_NO, both defined in the config_lang.php
see example code:

Code: Select all

 'en_US' => array(
	'block'=>'en',
	'flag'=>'<img src="/path_cms_root/images/lang/us.png" style="border:0; opacity:1;" alt="English" />',
	'text'=>'English',
 ),
 'no_NO' => array(
	'block'=>'no',
	'flag'=>'<img src="/path_cms_root/images/lang/no.png" style="border:0; opacity:1;" alt="Norsk" />',
	'text'=>'Norsk',
 ),

But, I do not know how to display the lang flag icons so I can click them in order to see correct language.

I do not understand {lang} syntax and have read countless guides here that refers to {lang} ...

I have tried to use {en}, {en_US}  .... which both fails
I have tried {$en_US} which gives no error, and no flags.

Could someone please give me an example how this {lang} actually should look like in a template.

Regards
Last edited by bongobongo on Fri Dec 12, 2008 12:48 am, edited 1 time in total.
dyp
New Member
New Member
Posts: 5
Joined: Fri Jan 02, 2009 7:29 am

Re: SOLVED Problem using {lang} in template... help!

Post by dyp »

first try {$lang} because it's a variable in cmsms code if you type {$lang} in templates it will send you back the fr, en, pl or others where you put the code.
see this cool post
http://forum.cmsmadesimple.org/index.ph ... 567.0.html
alby

Re: SOLVED Problem using {lang} in template... help!

Post by alby »

Ready4Fajir wrote:

Code: Select all

	'flag'=>'<img src="simplecms/images/lang/gb.png" style="border:0; opacity:1;" alt="English" />',
If you calling http://xxxxxxx/[b][cms_subdir_if_present/][/b]simplecms/images/lang/gb.png
view gb.png icon?

Alby
alby

Re: SOLVED Problem using {lang} in template... help!

Post by alby »

Ready4Fajir wrote: pasting this URL:

http://localhost/[cms_subdir_if_present/]simplecms/images/lang/gb.png

into my browser (my CMSMS is running on locahost with XAMPP).
I say: are you sure of your flag link? simplecms is a subdir ....

from your complete flag url, search with your browser but I suppose that it's::
http://localhost/simplecms/images/lang/gb.png

if yes then correct flag address is:
'flag'=>'',

or better (in this mode is valid for admin part also)

'flag'=>'',

Alby
alby

Re: SOLVED Problem using {lang} in template... help!

Post by alby »

Ready4Fajir wrote:
yes, that link does show the flag.
alby wrote:
'flag'=>'',
or better (in this mode is valid for admin part also)
'flag'=>'',
Tried both - neither of it works. I am afraid the mistake may be elsewhere - probably in my template setup (see first post)?
With second flag link, you see something in admin part?

Alby
alby

Re: SOLVED Problem using {lang} in template... help!

Post by alby »

Ready4Fajir wrote:
I am afraid no - nothing whatsoever  :( ...
then you must check whole procedure, it's not problem of lang plugin

Alby
Locked

Return to “[locked] CMSMS MLE fork”