jrgong
(jrgong)
11 Novembre 2025, 7:13pm
1
C’è un modo per accedere alle versioni localizzate dei contenuti “cooked” tramite API?
Ho provato tramite richieste GET aggiungendo ?tl=en come parametro, ma ottengo come risultato il contenuto originale, non la traduzione.
2 Mi Piace
pfaffman
(Jay Pfaffman)
11 Novembre 2025, 7:36pm
2
In generale, se vuoi saperne di più sull’API, il modo più veloce è Ingegnerizzare al contrario l’API di Discourse
1 Mi Piace
pmusaraj
(Penar Musaraj)
11 Novembre 2025, 7:54pm
3
Questo funziona già per me, ad esempio l’argomento corrente con ?tl=fr dà la risposta corretta, notare che cooked è in francese:
nat
(Natalie T)
Ha separato questo argomento il
14 Novembre 2025, 2:28am
4
Un post è stato diviso in un nuovo argomento: Tl=lang crawler view not showing posts in lang
jrgong
(jrgong)
11 Novembre 2025, 7:56pm
5
Ho provato esattamente questo tramite l’endpoint /posts/id.json, ma ottengo solo la versione originale in cooked.
Potresti controllare da parte tua? https://meta.discourse.org/posts/1887991.json?tl=fr
pmusaraj
(Penar Musaraj)
11 Novembre 2025, 7:57pm
6
Quel endpoint funziona per me, restituisce cotto in francese. Se passo a tl=es, restituisce cotto in spagnolo.
pmusaraj
(Penar Musaraj)
11 Novembre 2025, 8:03pm
8
Stai chiamando questi endpoint da un utente specifico? Da parte mia, sto effettuando le richieste in modo anonimo.
jrgong
(jrgong)
11 Novembre 2025, 8:08pm
9
Sì, li faccio mentre sono loggato. Ed è proprio quello che sto cercando di ottenere, dato che voglio essere in grado di OTTENERE post da categorie chiuse nel nostro forum.
1 Mi Piace
nat
(Natalie T)
12 Novembre 2025, 1:41am
10
Il parametro tl funziona solo per gli anonimi.
site_settings:
allow_bulk_invite: "Allow bulk invites by uploading a CSV file"
disabled: "disabled"
display_local_time_in_user_card: "Display the local time based on a user's timezone when their user card is opened."
censored_words: "Words that will be automatically replaced with ■■■■"
delete_old_hidden_posts: "Auto-delete any hidden posts that stay hidden for more than 30 days."
default_locale: "The default language of this Discourse instance. You can replace the text of system generated categories and topics at <a href='%{base_path}/admin/customize/site_texts' target='_blank'>Customize / Text</a>."
allow_user_locale: "Allow users to choose their own language interface preference"
set_locale_from_accept_language_header: "Set interface language for anonymous users from their web browser's language headers"
set_locale_from_cookie: "Allows setting an anonymous user's locale via the 'locale' browser cookie"
set_locale_from_param: "Allows setting an anonymous user's locale via the 'tl' URL param, e.g. ?tl=es"
support_mixed_text_direction: "Support mixed left-to-right and right-to-left text directions"
min_post_length: "Minimum allowed post length in characters (excluding personal messages)"
min_first_post_length: "Minimum allowed first post (topic body) length (excluding personal messages)"
prevent_uploads_only_posts: "Don't count upload markdown code when checking for min post length"
min_personal_message_post_length: "Minimum allowed post length in characters for messages (both first post and replies)"
max_post_length: "Maximum allowed post length in characters"
topic_featured_link_enabled: "Allows users to associate a feature link with their topics. When turned on, topics can have a highlighted link attached, which is publicly visible and can be edited if the user has sufficient permissions. The feature link can enhance a topic's comprehensibility by providing related additional content."
show_topic_featured_link_in_digest: "Show the topic featured link in the digest email."
min_topic_views_for_delete_confirm: "Minimum amount of views a topic must have for a confirmation popup to appear when it gets deleted"
min_topic_title_length: "Minimum allowed topic title length in characters"
3 Mi Piace
jrgong
(jrgong)
12 Novembre 2025, 8:30am
11
Grazie per la conferma! Modificherò il primo post in una richiesta di funzionalità.