Language file & Character encoding auto-detection

108 views
Skip to first unread message

DrakoWhole

unread,
Jun 1, 2011, 7:45:13 AM6/1/11
to ResourceSpace
Hi. I have 2 questions to the community:

a) I have several RS instances on the same server. This means that any
time I make modifications to the es.php file with new Spanish
translations I need to populate this file into the different RS
instances. Is there a way to specify in the config.php the location of
the language file?

b) When translating into Spanish, I have to convert the special
characters like ñ, or ´ into something like ñ, ó, á, which makes it
too exhausting and slow. I have seen something in the
config.defualt.php file that might help, but to be honest I do not
understand very well the usage, and maybe some of you guys could help
me:

# IPTC header - Character encoding auto-detection
# If using IPTC headers, specify any non-ascii characters used in your
local language
# to aid with character encoding auto-detection.
# Several encodings will be attempted and if a character in this
string is returned then this is considered
# a match.
# For English, there is no need to specify anything here (i.e. just an
empty string)
# The example given is for Norwegian.
$iptc_expectedchars="æøåÆØÅ";

Any help on these two questions would be much appreciated.
Thanks.

Henrik

unread,
Jun 8, 2011, 7:00:49 PM6/8/11
to ResourceSpace
a) No, it’s not possible to specify the location in the config.php.
But you may change it in db.php, row 123:
include dirname(__FILE__)."/../languages/" .
safe_file_name($language) . ".php";
Please note that the file setup.php uses its own code for including
the selected language (just affecting the initial setup page).

b) The problem is probably that your text editor doesn’t support UTF-8
(without BOM) or doesn’t identify the file as UTF-8. If it’s not
possible to change the coding to UTF-8 in your text editor you should
try another text editor. (I’m using Notepad++ in Windows.) If you use
a texteditor with UTF-8 support you will find this line in
config.default.php:
$iptc_expectedchars="æøåÆØÅ";
instead of:
$iptc_expectedchars="æøåÆØÅ";

/Henrik

David Dwiggins

unread,
Jun 8, 2011, 7:07:32 PM6/8/11
to resour...@googlegroups.com
You could also solve the language file problem by creating a master
copy of the file and then replacing the file in each of the
installations with a symbolic link to the master file. ResourceSpace
wouldn't know the difference, but you would only have to edit in one
place to make changes.

-David

> --
> You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
> To post to this group, send email to resour...@googlegroups.com.
> To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages