summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/HAFAS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/HAFAS.pm')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index 780d89f..cd9e9f2 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -33,6 +33,7 @@ my %hafas_instance = (
name => 'Deutsche Bahn',
productbits => [qw[ice ic_ec d regio s bus ferry u tram ondemand]],
salt => 'bdI8UVj4' . '0K5fvxwf',
+ languages => [qw[de en fr es]],
request => {
client => {
id => 'DB',
@@ -339,6 +340,10 @@ sub new {
};
}
+ if ( $conf{language} ) {
+ $req->{lang} = $conf{language};
+ }
+
$self->{strptime_obj} //= DateTime::Format::Strptime->new(
pattern => '%Y%m%dT%H%M%S',
time_zone => 'Europe/Berlin',
@@ -986,6 +991,12 @@ If this option is set, only the modes of transport appearing in I<mot1>,
I<mot2>, ... will be returned. The supported modes depend on B<service>, use
B<get_services> or B<get_service> to get the supported values.
+=item B<language> => I<language>
+
+Request text messages to be provided in I<language>. Supported languages depend
+on B<service>, use B<get_services> or B<get_service> to get the supported
+values. Providing an unsupported or invalid value may lead to garbage output.
+
=item B<lookahead> => I<int> (station)
Request arrivals/departures that occur up to I<int> minutes after the specified datetime.