Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
JLanguage, how to use?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andreas Tasch  
View profile  
 More options Jul 26 2012, 6:06 am
From: Andreas Tasch <andy.ta...@gmail.com>
Date: Thu, 26 Jul 2012 03:06:50 -0700 (PDT)
Local: Thurs, Jul 26 2012 6:06 am
Subject: JLanguage, how to use?

Hi,

I try to use JLanguage within my app. Please let me know what I'm doing
wrong or how to implement multilanguage support correctly.

In the constructor of my JApplicationWeb class I do this:
//initialise language files
if(is_null($this->language))
{
$this->language = JLanguage::getInstance('de-DE',false);
$this->language->setDefault('de-DE');
$this->language->setLanguage('de-DE');

}

This correctly loads the ./language/de-DE.ini file. But JText::_()
translates it with the en-GB.ini instead - what am I missing?

thx in advance


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Jul 26 2012, 6:09 am
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Thu, 26 Jul 2012 12:09:24 +0200
Local: Thurs, Jul 26 2012 6:09 am
Subject: Re: [jplatform] JLanguage, how to use?
Just a hunch but try adding this:

JFactory::$language = $this->language;

Best regards
Rouven

On 26.07.2012, at 12:06, Andreas Tasch wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Tasch  
View profile  
 More options Jul 26 2012, 9:47 am
From: Andreas Tasch <andy.ta...@gmail.com>
Date: Thu, 26 Jul 2012 06:47:34 -0700 (PDT)
Local: Thurs, Jul 26 2012 9:47 am
Subject: Re: [jplatform] JLanguage, how to use?

Hi Rouven,

1000 thanks, that worked!

Unfortunately I don't know where I should have found that information - are
there any docs available? Is this the correct way to implement JLanguage,
JSession, etc?

The platform-examples are a good starting point but in case of JSession and
now JLanguage I was lost. If you guys let me know what is the correct way
to make use of e.g. JLanguage, JSession etc. I'm going to write a more
complete platform-example.

Documentation is regarding platform and how to build a webapp is really
lacking this information. If I look how the CMS does certain things I still
do not know if it is the correct new way of using the platform as they use
legacy layer or cms specific solutions.
Is there a "right" way to do this? Should I use JFactory to instantiate
JSession or should I use JSession directly. This is really confusing.

Thanks for pointing me the right direction.

Am Donnerstag, 26. Juli 2012 12:09:24 UTC+2 schrieb Rouven Weßling:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Jul 26 2012, 9:56 am
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Thu, 26 Jul 2012 15:56:25 +0200
Local: Thurs, Jul 26 2012 9:56 am
Subject: Re: [jplatform] JLanguage, how to use?
Hi Andreas,
On 26.07.2012, at 15:47, Andreas Tasch wrote:

> Hi Rouven,

> 1000 thanks, that worked!

> Unfortunately I don't know where I should have found that information - are there any docs available? Is this the correct way to implement JLanguage, JSession, etc?

We've slowly started moving stuff out of JFactory but until we get there it's a good idea to set up the factory with the objects you set up.

In case of JLanguage you could also populate the configuration with the language. The factory will than configure JLanguage with that information and you're good to go.

> The platform-examples are a good starting point but in case of JSession and now JLanguage I was lost. If you guys let me know what is the correct way to make use of e.g. JLanguage, JSession etc. I'm going to write a more complete platform-example.

> Documentation is regarding platform and how to build a webapp is really lacking this information. If I look how the CMS does certain things I still do not know if it is the correct new way of using the platform as they use legacy layer or cms specific solutions.
> Is there a "right" way to do this? Should I use JFactory to instantiate JSession or should I use JSession directly. This is really confusing.

The platform is still in its infancy, we have already deprecated quite a bit of things from JFactory and I'm pretty sure at least the session will follow sooner or later we're just not quite there yet.

Best regards
Rouven


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »