HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Help with langage problems on created a new block mod

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#18902 (In Topic #4392)
Avatar

Fan in training

Hey I'm useing ocportal in whole new way.  I am an old hate java guy that wants to use it as a true "portal" engine like websphere portal for those that know java.  I am thinking its somewhat possible but in my playings I have an issue with the language pack thingy.

A language entry is missing: SL_LIST (ocPortal version: 2-6.2, PHP version: 4.4.2, URL: /admincentre/pg/admin_comcode_pages/__ed/index.php&wide=1)

I have a sl_list.ini in the lang_custom/EN folder with the definition for SL_LIST in it as follows:

[strings]
SL_LIST=Latest Scriptlance Projects

[descriptions]


so what am I doing wrong?
Back to the top
 
Posted
Rating:
#18903
Avatar

If you're writing a block, have you required the language file in the PHP code, using require_lang('sl_list');?

Back to the top
 
Posted
Rating:
#18904
Avatar

Fan in training

the text interprated is actually being used in the template...so would I still require it in the php?
Back to the top
 
Posted
Rating:
#18907
Avatar

Yep. For efficiency, only certain language files are preloaded.

You have a few options…
  • if it's a block you're writing, do as Philip says
  • if you're just adding a new string to a template, chances are you are better off just writing in the text directly (unless you're running multiple languages at once)
  • add the new string to global.ini, which is the master language file
  • make a minimodule instead of a Comcode page. You can then have commands like 'require_lang' as well as HTML, and it's very easy for a programmer to do.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#18911
Avatar

Fan in training

Thanks guys,  with the require_lang in the block php code it works great.  Didnt realize that it didnt pull them all in.
Back to the top
 
There are too many online users to list.
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: