mikehaertl / localeurls Goto Github PK
View Code? Open in Web Editor NEWAutomatic locale/language management for URLs
Automatic locale/language management for URLs
Hi,
I always get this error message:
LocaleHttpRequest.preferredLanguages is not defined...
Could someone help?
Thanks in advance!
Hy!
LocaleUrlManager print out 'controller''controller' before render html why?
If url is:
http://z3us.sytes.net/videos (error displayed)
If i use this url everything okay:
http://z3us.sytes.net/videos/index
public function init()
{
if($this->getUrlFormat()!==self::PATH_FORMAT)
throw new CException("LanguageUrlManager only works with urlFormat 'path'");
return parent::init();
}
It could be useful to map URL values to languages, e.g. english
in URL is mapped en
. Or also en
to en_gb
. We could configure it like this:
<?php
'languages' => array(
'de',
'en' => 'en_gb',
'fr',
),
Hy!
$this->route has return url without language code. So return "/user/my" not "/en/user/my". Thats bug or new feature?
How can yo use file translation with "localeurls" ?
I use a theme but my translated view file will not be loaded:
themes/ThemeID/views/ControllerID/contact.php
themes/ThemeID/views/ControllerID/LocaleID/contact.php
And how can i get a different naming in the urlpath for different languages?
I want:
http://example.com/en/contact
and use languaged naming convention for the actions.
http://example.com/de/kontakt
Do I need to change the rules?
Thanks Michael
Cheers
Hey Mike,
I was using your extension on a project and noticed that languages with a "-" or "_" in them brings up a 404 error: "Unable to resolve the request -ca", this was attempting to use en-ca or en_ca.
I've added the supported languages to the config array/
'languages' => array('en_us','en','de','fr','en_ca','en_gb'),
Is there a preferred format to enter the supported languages? Thanks for your help.
Best,
Sean
I have redirected to this wrong url if page open
'request'=>array(
'enableCsrfValidation'=>false,
'csrfTokenName'=>'z3us',
'enableCookieValidation'=>false,
'class'=>'ext.localeurls.LocaleHttpRequest',
'redirectDefault'=>false,
'languages'=>array(
'es'=>'Spain',
'ru'=>'Russian',
'tw'=>'Chinese',
'en'=>'English',
'ae'=>" الإمارات العربيّة المتّحدة ",
'hu'=>'Magyar',
'sk'=>'Slovak',
'ja'=>'日本国',
),
),
http://z3us.sytes.net/hu/6844cb9b3a818f7088c7c5d0bc845e16f1bd18cbs:2:%22hu%22;/
I have left / missed query string (?hash=akjdnjaksndjaksnd) after change language back to default. All not default language work perfect.
Hy.
Nice job.
CHtml::link helper remove language code from the url, if default language same as selected language.
The sample widget does not work if default language is en.
i want to load message translation from same folder when a language have two different language code. For example in persian both "fa" and "fa_ir" should be translated from "\protected\messages\fa_ir" directory.
I try to set config file like this
'request' => array(
'class' => 'ext.localeurls.LocaleHttpRequest',
'languages' => array(
'en', 'en_us', 'english', 'eng',
'fa'=>'fa_ir', 'fa_ir', 'farsi', 'far',
),
'detectLanguage' => false,
),
but it does not work and i should have two different folder one for "fa" and other for "fa_ir".Is there any solution to have single folder "fa" and then connect both "fa" and "fa_ir" to this folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.