tractorcow-farm / silverstripe-fluent Goto Github PK
View Code? Open in Web Editor NEWMulti-language translate module for Silverstripe, without having to manage separate site trees.
License: BSD 3-Clause "New" or "Revised" License
Multi-language translate module for Silverstripe, without having to manage separate site trees.
License: BSD 3-Clause "New" or "Revised" License
It would be nice to have aliases for each locale for urls, so that we could have
/en/page instead of /en_NZ/page.
Will need to create an alias mapping option for each so that the values can be customised.
When I run my unit tests (only the ones located within </mysite>
), I get the following error from phpunit:
Notice: Undefined index: REQUEST_URI in .../fluent/code/Fluent.php on line 293
Call Stack:
0.0026 632440 1. {main}() .../vendor/phpunit/phpunit/composer/bin/phpunit:0
0.0128 1097776 2. PHPUnit_TextUI_Command::main() .../vendor/phpunit/phpunit/composer/bin/phpunit:63
0.0128 1098504 3. PHPUnit_TextUI_Command->run() .../vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
0.0128 1098504 4. PHPUnit_TextUI_Command->handleArguments() .../vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:138
0.0193 1764456 5. PHPUnit_TextUI_Command->handleBootstrap() .../vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:606
0.0197 1780936 6. PHPUnit_Util_Fileloader::checkAndLoad() .../vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:778
0.0202 1781072 7. PHPUnit_Util_Fileloader::load() .../vendor/phpunit/phpunit/PHPUnit/Util/Fileloader.php:76
0.0206 1815520 8. include_once('.../framework/tests/bootstrap.php') .../vendor/phpunit/phpunit/PHPUnit/Util/Fileloader.php:92
0.0285 1935984 9. require_once('.../framework/core/Core.php') .../framework/tests/bootstrap.php:46
8.5159 9089856 10. Config->pushConfigYamlManifest() .../framework/core/Core.php:117
8.5168 9089928 11. SS_ConfigManifest->activateConfig() .../framework/core/Config.php:309
8.5281 12900104 12. require_once('.../fluent/_config.php') .../framework/core/manifest/ConfigManifest.php:141
8.5286 13101344 13. Fluent::init() .../fluent/_config.php:4
8.5286 13101392 14. Fluent::install_locale() .../fluent/code/Fluent.php:49
8.5286 13101392 15. Fluent::current_locale() .../fluent/code/Fluent.php:370
8.5297 13544880 16. Fluent::get_persist_locale() .../fluent/code/Fluent.php:77
8.5297 13544928 17. Fluent::is_frontend() .../fluent/code/Fluent.php:131
PHPUnit 3.7.27-dev by Sebastian Bergmann.
Configuration read from .../phpunit.xml
.
Time: 2.25 seconds, Memory: 95.25Mb
OK (1 test, 1 assertion)
Amazing module by the way! Many thanks for your effort!
In the documentation you indicate that "If you wish to translate has_many or many_many then those objects will need to be filtered via another method. See Locale based filter configuration".
In the section "Locale based filter configuration" is not clear how to do this type of relationship.
You could put some concrete example.
For example, if we have:
class SendaElement extends DataObject {
private static $many_many = array(
'Elements' => 'SendaElement'
);
}
Somehow, with the Fluent module installed should be as something like:
class SendaElement extends DataObject {
private static $many_many = array(
'Elements' => 'SendaElement'
);
private static $translate = array(
'Elements'
);
}
and if locales are en_US and es_ES it should be create two tables:
SendaElement_Elements_en_US
SendaElement_Elements_es_ES
According to the active locale will automatically use a table to another.
Can it be?
Thanks,
Regards,
Jose A.
I have tried to fix this myself, but unfortunately didn't get it a proper pull request so I am forced to request this feature.
Would it be possible on the frontend LocaleMenu to have a active language. This could hide the language that is selected, change the opacity or in whatever way you want it styled.
The selector in the CMS seems to be a bit dodgy, sometimes it shows up and sometimes it doesnt show up.
I find it hard to reproduce this. So cant make a really better description, it just happens while browsing through the sitetree.
When changing a Title of a page and after that making use of Update URL. It will change the all the URLSegments.
It would be a cool idea to show the alias in the URLSegment, like http://www.mysite.com/nl/ and when using English (US), http://www.mysite.com/en/
If a where filter is specified on a DataList then only the values set against the default locale will be compared.
Hi Damian!
I have observed that an extension to sitetree not display the icon on the fields that can be translated.
class SiteTreeDecorator extends DataExtension {
function updateCMSFields(FieldList $fields) {
$fields->insertBefore(
$contentstructure = TextareaField::create('ContentStructure', 'Content Structure'), 'Content'
);
}
}
Can I solve this problem somehow?
Thanks Damian,
Regards,
Jose A.
I have a setup of two locales in ModelAdmin and I translate two fields, Description & Stad.
I create a new dataobject in Locale Dutch and I fill in Description and Stad as I want. When I then switch to Locale English both Description and Stad have the same value as the Locale Dutch.
I think those fields shouldnt be "listening" and should be kept empty, this can confuse the end-user. Also when leaving the fields empty it shows that those fields are being translated.
Example:
I fill in the fields and save.
Then I switch to the Dutch Locale [Ideally, the Description field here should be empty]
Need to ensure that fulltext search is working on the correct locale
If publishing a page outside of the default locale, the default locale field will not be published.
To reproduces:
The function Fluent::detect_browser_locale() uses $_SERVER['HTTP_ACCEPT_LANGUAGE'] to identify browser language. This seems to cause problems when scraping a Fluent site. Scrapers like Facebook's debugger (https://developers.facebook.com/tools/debug) report critical HTML errors. Removing $_SERVER['HTTP_ACCEPT_LANGUAGE'] fixes this.
Following on from the discussion at #42 fluent needs to be updated to cater for domain switches for locales.
I think the most important thing is that it's easy to configure and use. I propose a config schema similar to the below:
---
Name: myfluentconfig
After: '#fluentconfig'
---
Fluent:
domains:
us.domain.com:
locales:
- 'en_US'
- 'es_US'
default_locale: 'en_US'
oceania.domain.com:
locales:
- 'en_NZ'
- 'en_AU'
default_locale: 'en_NZ'
ca.domain.com:
locales:
- 'en_CA'
www.domain.fr:
locales:
- 'fr_FR'
I considered allowing the baseURL prefix (E.g. /en_NZ/) to be omitted for domains with only a single locale, but I think a better solution (and referring to #42 above) is to not require the prefix for the home page for the default locale on any domain. This has the added benefit of removing a redirect when landing on the domain home page.
The home pages for each locale would be:
Considering that it can be difficult to work with live configurations in the main yaml configuration file (especially when testing locally) I imagine that the routing scheme would only be active when the current domain was one of the customised domains (so running off localhost would not trigger the switch).
Any comments on this?
Hi Damian!
If I open two tabs in browser.
In the first tab open the CMS and select a record of a class that inherits from DataObject (ModelAdmin) and select the English language.
In the second tab I open the website that I'm creating and select another language with its language selector, for example, Spanish.
Now I select CMS tab and I click on the 'Save' button in the CMS.
In that record that I saved, the English language texts overwrites the Spanish language texts of the multilanguage fields.
In summary, the cookie for the locale that you use in the CMS should be different to that used in the frontend, since side effects may occur.
You will need to include a current_locale() method for CMS and a different one for the FrontEnd.
Regards,
Jose A.
When I'm on the login page the website local selector not working .
<% include LocaleMenu %>
If I include in the selector link the locale ?FluentLocale= :
<li class="en_US"><a href="Security/login?FluentLocale=en_US" hreflang="en_US" title="English (United States)"><img class="imageflags" src="senda/images/flags/en_US.gif"> English (United States)</a></li>
<li class="es_ES"><a href="Security/login?FluentLocale=es_ES" hreflang="es_ES" title="Spanish (Spain)"><img class="imageflags" src="senda/images/flags/es_ES.gif"><strong> Spanish (Spain)</strong></a></li>
This does not work because Controller::has_curr() return false in current_locale function (Fluent.php).
You may have to use $_REQUEST to get the value of FluentLocale in current_locale function.
If you can solve this problem I think that Fluent will have no bugs and the module is ready for the most demanding sites. :)
Thanks Damian,
Regards,
Jose A.
Hi!
/**
* Installs the current locale into i18n
*/
public static function install_locale() {
// Ensure the locale is set correctly given the designated parameters
$locale = self::current_locale();
i18n::set_locale($locale);
setlocale(LC_ALL, $locale);
// Get date/time formats from Zend
require_once 'Zend/Date.php';
i18n::set_date_format(Zend_Locale_Format::getDateFormat($locale));
i18n::set_time_format(Zend_Locale_Format::getTimeFormat($locale));
}
i18n::set_date_format(Zend_Locale_Format::getDateFormat($locale));
i18n::set_time_format(Zend_Locale_Format::getTimeFormat($locale));
This functions are deprecated.
Regards,
Jose A.
The locale dropdown in the CMS isn't very attractive, but I'm not really much of a designer. Can someone come up with a design concept for a better, more attractive menu? Maybe something that distinguishes itself a little more from the rest of the menu?
I set up fluent to work with two locales (default de_DE, en_US).
I think the problem is, that silverstripe would set NULL for the Menu Title field, whenever the Title and Menu Title inputs are the same. Fluent recognises that it would be NULL and automatically sets the value that is already defined in the standard "Title" field.
For example:
If in step 2 I enter Title_en_US = "bar" and MenuTitle_en_US = "bar2" everything works fine.
I hope you understand my problem?!
Unfortunately LocalisedField class doesn't get add in ModelAdmin Dataobjects.
I am not sure, but I feel that there is a significant loading time difference when going to the website as:
or when going directly to a locale
Also if I would like to have http://nl.mysite.com/ and http://en.mysite.com/ is Fluent to right place to ask for that enhancement or is that not Fluent related?
I have a user with Interface Language Dutch, but sometimes when going through the CMS it switches to English and sometimes to Dutch.
Seems like the Locale isn't always being loaded well. This didn't acquire before.
Hi Damian!
When the Comments module is installed (https://github.com/silverstripe/silverstripe-comments), new added comments should be displayed only when the language in which they were introduced is active.
That is, when the Spanish language is active and displays a blog article, the new comments that are added โโat that time should be displayed only when the active language is Spanish.
For this, the Comment table should include a Locale field to filter by that field.
The same goes for the Forum module (https://github.com/silverstripe/silverstripe-forum), new posts added in a forum section should be displayed only when the language in which they were introduced is active on the web.
For this, the ForumThread table should include a Locale field to filter by that field.
Surely, Fluent module should have an extension in order to control this type of case.
Thanks Damian,
Regards,
Jose A.
Hi Damian!
I was having problems with the CMS to write a record with the correct values โโfrom Fluent.
When researching I discovered that is_frontend() function returns a bad result in some cases, for example with the following URL:
/admin/pages/edit/EditForm/field/URLSegment/suggest/?value=JfControls%20Standard
public static function is_frontend() {
// No controller - Possibly pre-route phase, so check URL
if(!Controller::has_curr()) {
$base = preg_quote(Director::baseURL(), '/');
return !preg_match('/^'.$base.'admin(\/|$)/i', $_SERVER['REQUEST_URI']);
}
// Detect all admin controllers
$controller = Controller::curr();
return !($controller instanceof AdminRootController)
&& !($controller instanceof LeftAndMain);
}
If $_SERVER['REQUEST_URI'] contain the URL
admin/pages/edit/EditForm/field/URLSegment/suggest/?value=JfControls%20Standard
then
return !preg_match('/^'.$base.'admin(\/|$)/i', $_SERVER['REQUEST_URI']);
return true
so get_persist_locale() function returns a bad result, because $key variable has the value 'FluentLocale' instead of 'FluentLocale_CMS'.
Thanks,
Regards,
Jose A.
the composer.json file states that the license is BSD, however in the readme is no mention of it under the license point
please ensure the license information is consistent
Hi Damian!
In your solution there are some problems, for example, when you are entering a new record:
$rec = new ElementCache();
$rec->field1 = 'datafield1';
$rec->field2 = 'datafield2';
$rec->write();
With your system this could not be done with a different locale.
I think a better solution is:
Flush.php
public static function SetTempLocale($locale) {
DataObject::flush_and_destroy_cache();
self::$_override_locale = $locale;
}
public static function ClearTempLocale() {
DataObject::flush_and_destroy_cache();
self::$_override_locale = null;
}
public static function current_locale() {
$locale = null;
if(self::$_override_locale) return self::$_override_locale;
// Check controller and current request
if(Controller::has_curr()) {
$controller = Controller::curr();
$request = $controller->getRequest();
if(self::is_frontend()) {
// If viewing the site on the front end, determine the locale from the viewing parameters
$locale = $request->param('FluentLocale');
}
if(empty($locale)) {
// If viewing the site from the CMS, determine the locale using the session or posted parameters
$locale = $request->requestVar('FluentLocale');
}
}
// check session
if(empty($locale)) $locale = Session::get('FluentLocale');
// Check cookies
if(empty($locale)) $locale = Cookie::get('FluentLocale');
// Check result
if(empty($locale)) $locale = self::default_locale();
// Reset to default locale if not listed in the specified list
$allowedLocales = self::locales();
if(!in_array($locale, $allowedLocales)) $locale = self::default_locale();
// Save locale
Session::set('FluentLocale', $locale);
// Prevent unnecessarily excessive cookie assigment
if(!headers_sent() && self::$last_set_locale !== $locale) {
self::$last_set_locale = $locale;
Cookie::set('FluentLocale', $locale);
}
return $locale;
}
In this way:
Flush::SetTempLocale('es_ES');
$rec = new ElementCache();
$rec->field1 = 'datafield1';
$rec->field2 = 'datafield2';
$rec->write();
Flush::ClearTempLocale();
I 've tried this system and it works perfectly.
What do you think?
Thanks,
Regards,
Jose A.
This is my fluent.yml
Name: myfluentconfig
After: '#fluentconfig'
---
Fluent:
default_locale: nl_NL
locales:
- en_US
- nl_NL
---
Name: myfluenti18nconfig
After: '#fluenti18nconfig'
---
i18n:
default_locale: nl_NL
Currently the CMS interface language is always en_US and when I try to change it in the CMS to Dutch, it just switches back to English (US).
On the frontend the URLs of the LocaleMenu doesn't seem to update to the locale URLSegment value.
/en/tournaments <- URLSegment_en_US
/nl/toernooien <- URLSegment
On the frontend only seems to read URLSegment
Hi!
It would be interesting that the first time a user accesses a website will be displayed in the language of your web browser and if that language is not defined then in the default language.
If the user selects another language, this selection would be stored in a cookie for the next time the user visits the web.
Thanks,
Regards,
Jose A.
Hi Damian!
How I can disable FluentMySQLSearch class?
If I delete the following lines in the fluent.yml file errors occur.
search_adapters:
MySQLDatabase: FluentMySQLSearch
I use a proprietary search.
Thanks,
Regards,
Jose A.
Now the
Fluent:
detect_locale: true
not work
If I put 127.0.0.1 the browser goes to the page with the default languaje (english), not to the page with the browser language (spanish).
Regards,
Jose A.
Hi Damian!
There are still problems with detection.
The following module is not working:
https://github.com/sunnysideup/silverstripe-ecommerce_product_variation
This module uses a CMS controller (CreateEcommerceVariations) that inherits from the Controller class, so that is not detected:
public static function is_frontend($ignoreController = false) {
// No controller - Possibly pre-route phase, so check URL
if($ignoreController || !Controller::has_curr()) {
// $_SERVER['REQUEST_URI'] indeterminatelys lead with '/', so trim here
$base = preg_quote(ltrim(Director::baseURL(), '/'), '/');
return !preg_match('/^(\/)?'.$base.'admin(\/|$)/i', $_SERVER['REQUEST_URI']);
}
// Detect all admin controllers
$controller = Controller::curr();
return !($controller instanceof AdminRootController)
&& !($controller instanceof LeftAndMain);
}
The following line return true:
return !($controller instanceof AdminRootController)
&& !($controller instanceof LeftAndMain);
I tried to inherit from LeftAndMain or AdminRootController, but the module does not work this way.
However, sometimes the following line is met:
if($ignoreController || !Controller::has_curr()) {
so run the following lines:
$base = preg_quote(ltrim(Director::baseURL(), '/'), '/');
return !preg_match('/^(\/)?'.$base.'admin(\/|$)/i', $_SERVER['REQUEST_URI']);
The URL is:
$_SERVER['REQUEST_URI']= /createecommercevariations/rename/17/?typeorvalue=value&value=full%2520licensecaca33&id=2
so, this code return true:
$base = preg_quote(ltrim(Director::baseURL(), '/'), '/');
return !preg_match('/^(\/)?'.$base.'admin(\/|$)/i', $_SERVER['REQUEST_URI']);
it is also wrong. :(
What do you think?
Which do you believe will be the best solution?
Thanks,
Regards,
Jose A.
Hi Damian!
The notifications do not take into account the locale.
The english notification is in MemberLoginForm.php
public function forgotPassword($data) {
.....
$this->sessionMessage(
_t('Member.ENTEREMAIL', 'Please enter an email address to get a password reset link.'),
'bad'
);
.....
This is because install_locale method not running when the notification occurs.
Regards,
Jose A.
Hi Damian!
I tried the following, but does not work (mysite/_config/fluent.yaml):
Fluent:
search_adapters:
MySQLDatabase: null
The FluentMySQLSearch class methods still running (augmentSearch, getSearchFilter, ...)
.If I replace the following in fluent/_config/fluent.yml:
search_adapters:
MySQLDatabase: FluentMySQLSearch
by
search_adapters:
MySQLDatabase: null
the following error occurs when doing dev/build:
Fatal error: Class name must be a valid object or a string in C:\wamp\www\fluent\code\Fluent.php on line 386
public static function search_adapter() {
foreach(self::config()->search_adapters as $connector => $adapter) {
if(DB::getConn() instanceof $connector) {
return new $adapter();
}
}
}
This is because $adapter is null.
You ask me "What kind of search are you using?"
I'll explain in more detail here: https://github.com/tractorcow/silverstripe-fluent/issues/19
Thanks,
Regards,
Jose A.
Hi there,
Great module, having much more success with it than the other translation modules!
Question, is it possible to use the locale filter for pages? So I can select a page to not show in a certain language?
Cheers
You probably should not create separate forums for different languages, if you expect them to act as a single translated page. I'd suppose the better way to do this is to create one forum, and to apply a locale filter to the individual posts onBeforeWrite (as discussed earlier), but I'll leave this choice up to you. :) The downside of the way that you've chosen above is that now links between locales don't correspond to these two pages, as it's only meant to work on a single SiteTree object. Go back to using a single translated forum page and it'll work as expected. See my comment at #24 for help.
That was my first try, because this is the best solution, unfortunately the forum does not work properly with this technique.
In my first attempt FluentFilteredExtension applied to ForumThread class and put the onBeforeWrite event in an extension for that class.
In this way the forum works properly, but the counters of topics and posts do not respect the locale.
See picture below.
I will see if I can change those counters.
Sorry if I've written too much lately.
I will try to disturb as little as possible. ;)
Do you prefer to write you directly to your email?
Thanks Damian,
Regards,
Jose A.
Does anyone need a migration tool for translatable websites? I was thinking I could develop a migration task for users who want to migrate a site, or test out how their existing translatable site performs using fluent.
Need to investigate replacement for SiteTreeURLSegmentField with an alternative that generates correct URLs.
When viewing a top level page the URL doesn't appear to contain the locale, but second level pages do. The field needs to be updated to consider that the locale needs to be injected between the BaseURL and the root page URLSegment.
Should be pretty easy to fix.
There are some i18nEnum outthere, but those only allow support for the CMS and not on the frontend.
Would this feature be possible? It seems like a big request though :(
If not, what could I use as alternative solution? I have been struggling with this for awhile.
en_NZ etc checkboxes should use the locale name, not the code.
Also this class needs better helper functions and documentation.
Hi Damian!
I have a function that returns the browser language from priorities, but I do not know if it's better that you have included in the code.
It takes into account the member locale.
I'll put it below should you want to see.
$locale = Cookie::get('senda_lang');
if (!isset($locale)) {
$uid = Cookie::get('senda_mem');
if (isset($uid) && ($uid != 0)) {
$member = Member::get_by_id("Member", $uid);
if ($member) {
$locale = $member->locale;
}
}
if (!isset($locale) || !(in_array($locale, $langsAvailable))) {
$locale = self::default_locale();
// First try to detect browser preferred language
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$locales = array();
$list = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
foreach($list as $part) {
$priority = '';
@list($_locale, $priority) = explode(';', $part);
if ($priority) {
$priority = substr($priority, 2);
} else {
$priority = 1.0;
}
if (preg_match('/^([a-zA-Z]+)$/', $_locale, $match)) {
if (isset(i18n::$likely_subtags[$match[1]])) {
$_locale = i18n::$likely_subtags[$match[1]];
} else {
$_locale = self::default_locale();
}
} else if (preg_match('/^([a-zA-Z]+)-([a-zA-Z]+)$/', $_locale, $match)) {
$_locale = $match[1] . '_' . strtoupper($match[2]);
} else {
$_locale = self::default_locale();
}
if (in_array($_locale, $locales) == false) {
$locales[$priority] = $_locale;
}
}
// Sort browser locales by priority
krsort($locales);
// Try to find best matching browser locale
foreach($locales as $_locale) {
if ($langsAvailable) {
if (isset($langsAvailable) && in_array($_locale, $langsAvailable)) {
$locale = $_locale;
break;
}
} else if (self::$allowed_locales) {
if (in_array($_locale, self::$allowed_locales)) {
$locale = $_locale;
break;
}
} else {
if (isset(i18n::$all_locales[$_locale])) {
$locale = $_locale;
break;
}
}
}
}
}
}
// }
}
Regards,
Jose A.
When adding a include you are usually forced to flush.
Now when I flush like, http://www.mysite.com?flush=all I keep getting the same error that the template cannot be found.
Once I do, http://www.mysite.com/nl?flush=all - the flushing works like it usually works.
When switching language I am not sure if the other language got flushed aswell. It seems abit dodgy, it does show up the error but once I do a normal refresh - the error seems gone.
Hi Damian!
Sometimes you have to perform operations on a dataobject with a temporary locale without changing the current locale.
It might be interesting to have a set of functions that would connect a locale temporarily for specific operations.
The functions could be:
Flush.php
public static function SetTempLocale($locale) {
self::$tempLocale = $locale;
}
public static function GetTempLocale($locale) {
return self::$tempLocale;
}
public static function ClearTempLocale() {
self::$tempLocale = null;
}
Now would you modify the current_locale() code to take account of this temporary variable.
In this way it is not necessary to touch the session variables or cookies ('FluentLocale).
What do you think?
Thanks,
Regards,
Jose A.
Hi Damian,
To work properly the forums I had to create a forum page in English and one in Spanish.
I have applied FluentFilteredExtension extension to the ForumHolder page, so through the CMS I could indicate what is the English forum and what is the Spanish forum .
The English Forum URLSegment is forums (http://127.0.0.1/en-us/support/forums).
The Spanish forum URLSegment is foros (http://127.0.0.1/es-es/support/foros).
Now I have a problem with the language selector. <% include LocaleMenu %>
If I am in English forum, ie http://127.0.0.1/en-us/support/forums,
and try to move to the spanish forum through the website language selector,
the page that is selected is URL is http://127.0.0.1/es-es/support/forums/
What shows the english forum with texts in spanish.
Should not be able to select this URL http://127.0.0.1/es-es/support/forums/ , because through FluentFilteredExtension I have indicated that the Forums page is only for English, not Spanish.
It should be shown the error page 404.
There should be an automatic mechanism by which we could say that
http://127.0.0.1/en-us/support/forums (for the English page)
is equivalent to
http://127.0.0.1/es-es/support/foro (for the Spanish page)
What do you think?
Thanks,
Regards,
Jose A.
It would be good if the default sitemap.xml would show up pages in all locales.
To investigate feasibility / correctness of solution.
At the moment I think its very messy how the translate fields are being shown.
I have a DataObject with:
private static $db = array(
"Jaartal" => "Varchar(255)",
"StartDate" => "Date",
"EndDate" => "Date",
"Description" => "HTMLText",
"Land" => "Varchar(10)",
"Stad" => "Varchar(255)",
"ExceliFrame" => "HTMLText",
// Prijzengeld
"PrijsPlaatsEen" => "Varchar(255)",
"PrijsPlaatsTwee" => "Varchar(255)",
"PrijsPlaatsDrie" => "Varchar(255)",
"TotaalPrijzengeld" => "Varchar(255)",
// Kampioen
"KampioenNaam" => "Varchar(255)",
"KampioenLand" => "Varchar(10)"
);
All fields are currently being translated because of the following setting in fluent.yml:
- 'Text'
- 'Varchar'
- 'HTMLText'
- 'HTMLVarchar'
While I would for example only want Description, Land to be translated in this DataObject.
But then I come to the messy part, all the fields are being thrown in the main tab including en_US and nl_NL and they also seem to duplicate once.
So I have Voornaam, Voornaam_nl_NL and Voornaam_en_US get added. But I think it should only shown Voornaam_nl_NL and Voornaam_en_US.
I hope I made myself clear enough otherwise you know where to find me!
Something has changed in the latest versions of fluent.
Now fluent does not save the last user's language selection.
That is,
If my fluent.yaml is:
---
Name: myfluentconfig
After: '#fluentconfig'
---
Fluent:
default_locale: en_US
locales:
- en_US
- es_ES
aliases:
en_US: en-us
es_ES: es-es
---
Name: myfluenti18nconfig
After: '#fluenti18nconfig'
---
i18n:
default_locale: en_US
I think this URL would be to work:
http://127.0.0.1/es-es/Security/login
but:
Sorry, it seems you were trying to access a page that doesn't exist.
Please check the spelling of the URL you were trying to access and try again.
Thank you for this wonderful module.
Regards,
Jose A.
Hi Damian,
In templates to display the menus we do the following:
<% loop Menu(1) %>
<% loop Children %>
.....
This mechanism does not respect the pages to which has been applied FluentFilteredExtension extension.
The menu shows all pages.
Regards,
Jose A.
Since the update for Googlesitemaps the custom dataobjects no longer are shown up, while they worked before. So it seems related to Fluent.
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.