jrgong
(jrgong)
11 Noviembre, 2025 19:13
1
¿Hay alguna forma de acceder a las versiones localizadas del contenido cocinado a través de la API?
Intenté mediante solicitudes GET añadiendo ?tl=en como parámetro, pero obtengo el contenido original, no la traducción, como resultado.
2 Me gusta
pfaffman
(Jay Pfaffman)
11 Noviembre, 2025 19:36
2
En general, si quieres informarte sobre la API, la forma más rápida es Ingeniería inversa de la API de Discourse
1 me gusta
pmusaraj
(Penar Musaraj)
11 Noviembre, 2025 19:54
3
Esto ya me funciona, por ejemplo, el tema actual con ?tl=fr da la respuesta correcta, fíjate que cooked está en francés:
nat
(Natalie T)
Separó este tema
14 Noviembre, 2025 02:28
4
jrgong
(jrgong)
11 Noviembre, 2025 19:56
5
Intenté exactamente eso a través del endpoint /posts/id.json, pero solo obtengo la versión original en cooked.
¿Podrías verificarlo en tu sistema? https://meta.discourse.org/posts/1887991.json?tl=fr
pmusaraj
(Penar Musaraj)
11 Noviembre, 2025 19:57
6
Ese punto de conexión funciona para mí, devuelve “cooked” en francés. Si cambio a tl=es, devuelve “cooked” en español.
pmusaraj
(Penar Musaraj)
11 Noviembre, 2025 20:03
8
¿Estás llamando a estos endpoints desde un usuario específico? Por mi parte, estoy realizando las solicitudes de forma anónima.
jrgong
(jrgong)
11 Noviembre, 2025 20:08
9
Sí, los hago mientras estoy conectado. Y eso es lo que estoy tratando de lograr, ya que quiero poder OBTENER publicaciones de categorías cerradas en nuestro foro.
1 me gusta
nat
(Natalie T)
12 Noviembre, 2025 01:41
10
El parámetro tl solo funciona para usuarios anónimos.
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 Me gusta
jrgong
(jrgong)
12 Noviembre, 2025 08:30
11
Gracias por la confirmación. Editaré el primer mensaje para convertirlo en una solicitud de función.