3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1376 Views |
-
sapphire/javascript/lang/en_US.js

18 June 2010 at 1:02am
Hello,
I added mysite/javascript/lang/ru_RU.js and flushed website, but still sapphire/javascript/lang/en_US.js load?public function init() {
...
Requirements::clear();
}doesn't help
-
Re: sapphire/javascript/lang/en_US.js

18 June 2010 at 4:48am Last edited: 18 June 2010 4:49am
and as addition how to form structure like that:
<% if Object.Method() == bla-bla %>
<% end_if %>i know that i can use:
<% control Object %>
<% if Method() == bla-bla %>
<% end_if %>
<% end_contol %>
but it looks odd -
Re: sapphire/javascript/lang/en_US.js

30 June 2010 at 9:27am Last edited: 30 June 2010 9:28am
I think I'm having similar issue here. Am on SS 2.4.0
Have added $SearchForm in my template and in _config.php:
FulltextSearchable::enable();
Translatable::set_default_locale('nl_NL');
Object::add_extension('SiteTree', 'Translatable');
i18n::set_locale('nl_NL');Have added following line in mysite/lang/nl_NL.php:
<?php
$lang['nl_NL']['SearchForm']['SEARCH'] = 'Test';
?>Now on the site (even with ?locale=nl_NL) the default search form value is taken from saphire/lang/nl_NL.php and not from mysite/lang/nl_NL.php. Newly created $lang rows (i.e. lang definitions not present in saphire/lang/nl_NL.php) in mysite/lang/nl_NL.php do work however.
Is it not possible to overload saphire/lang/nl_NL.php?
-
Re: sapphire/javascript/lang/en_US.js

30 June 2010 at 9:44am Last edited: 30 June 2010 9:56am
PS. This is in my Page.php:
public function init() {
parent::init();
// Set locale
if($this->dataRecord->hasExtension('Translatable')) {
i18n::set_locale($this->dataRecord->Locale);
}
... -
Re: sapphire/javascript/lang/en_US.js

3 July 2010 at 8:16pm
It's default locale as fallback: sapphire/javascript/i18n.js but u can block it Requirements::block('sapphire/javascript/i18n.js');
Requirements::add_i18n_javascript('<my-module-dir>/javascript/lang');
-
Re: sapphire/javascript/lang/en_US.js

5 August 2010 at 1:16am
Fixed this by creating folder zlang in root. Contents of this folder is empty _config.php (with <?php ?>) and lang folder with language files. Think I found this trick on ssbits.
| 1376 Views | ||
|
Page:
1
|
Go to Top |


